0

Ok, total newbie here (and English is not my first language, so sorry in advance!) but I can assure you: I have searched a lot before posting this. (like... more than 10 hours of searching...)

Basically: I started learning Python in December, in a sort of "low intensity" Bootcamp that covers the basics of the language, but as usual, the examples provided were very basic stuff... and now my final assignment is something very complex (for a newbie!): I have to build with Python, using OOP, a full fledged Software system for repairs tickets/RMA, both user side and Tech guy side.

And I'm stuck on how to manage the data that the users will give to the system. My course gave me super basic lessons on how to modify .txt files... like 3-4 lines of simple text, and the usual strip/split methods... but for this project I need a more organized approach, with lots of lines and multiple columns. I know the number of columns (because I have X nr of data fields) but I don't know the number of lines (every new user = 1 new line)

I've searched the most "comfy" way to append the same data fields (name, surname, mail, phone, item serial, item type, warranty or not, description of problem) where every line = 1 new user registered... and I thought I found the perfect solution: Pandas and the append method, on a csv file.

So I tried, user input in a dictionary, and then Pandas.append... but it doesn't seem to work, because it always say "The frame.append method is deprecated and will be removed from pandas!" And the suggested .concat doesn't seem to be the same thing!

In summary: I ask for your expert advice for the most simple/best way to add new lines of data, in a way that they are also easy to manipulate (when the user decide to edit the ticket) or easy to delete without screwing up the rest of the data.

I'm a newbie in a sea of solutions: I just need a tip on where to focus my resources! Sqlite? CsvDictWriter? Pandas? What else?

Thank you in advance!

CodingBad
  • 3
  • 1

1 Answers1

0

It seems a similar question was asked here: Good alternative to Pandas .append() method, now that it is being deprecated?

What the answer suggests is creating a list of dictionaries that you could then read/write to a text file. This answer suggests a way to do so: Read the written list of dictionaries from file in Python

You could also maintain a separate dictionary in a different file of user ids to the index in the list for easy editing. The above solution should be simple, but keep in mind better solutions certainly exist such as SQL database for example. Alternatively to that, you could simply maintain a CSV file and use pandas. I believe all of these could work based on what you want.

Jawand S.
  • 148
  • 10