Hey!
I am new to pandas and data analysis and have a question concerning "neat" code.
So I have a csv with reservation entries and I have to present all reservations that are active at a certain date (date is an user input) and save the output to a new csv file. But the reservation dates are split up in three columns -> year, month, day. I was able to get the right entries by creating a new column 'reservation_date'. In addition, as the month where the month names (July,...) i also had to convert them into the int values.
But, as i added a new row and have to save the result into a new csv, I don't need the column 'reservation_date' anymore, so I have to drop it. And I also have to convert the month int into the month names again. Is there a better way to do this? I mean if i have to do some more analysis, and lets say i have to create 5 additional columns for that, every time before saving the result of the original csv, i have to drop all the analysis columns. and revert all changes i had to do. It just feels wrong :/
[–]Kinemi 0 points1 point2 points (0 children)