Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

3
how can I write multiple rows to a csv with everything under the correct column?
Post Body

Howdy folks, so this is like my first solo 'project' and I'm starting small. Been googling around and watching youtube videos but can't quite seem to figure it out.

basically I'm tracking my workout data in a csv file and want to automate the addition of new data into that file.

So, what I'm attempting is a python script that will prompt me for a date, tracking type, exercise, result, and measurement type and then append that to the bottom of my csv for storing data.

Right now I have it working but I have to run the script from my command prompt each time I add a row, which isn't ideal. Ideally, Id be able to type in a date, then have it append X number of rows with everything under the right column.

For example: If Input a date, then if I input two exercises (say vertical jump and sprint distance) those get added in two rows under the 'Exercise' column while the one date is put in both rows. Then I type in their results ( say 27 and 140) and these go under the 'Results' column with the 27 corresponding to the row with the jump as the exercise and 140 as the sprint distance.

Can this be done with an arbitrary number of rows so I can put in say 5 exercises at once and have everything get added as its own row under the proper column, while not repeatedly entering the same date?

Hope this makes sense!

Author
Account Strength
90%
Account Age
6 years
Verified Email
Yes
Verified Flair
No
Total Karma
1,742
Link Karma
937
Comment Karma
805
Profile updated: 5 days ago
Posts updated: 5 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
3 years ago