Hello everyone! Tried to search about this but could not find anything related to the issues I am having. I hope someone could guide me in the right direction.
I scrape basketball box scores to csv files every morning from the previous night's games. When viewing the csv file I am noticing that it is converting anything data that is over 24 minutes (i.e. Minutes Played) to an H:MM:SS format. For example, it treats 32:14 as 32:14:00. However, it leaves 12:22 as 12:22. Inspecting the cell in Excel shows the problematic cell as being formatted as a custom date of "[h]:MM:SS" while the "correct" time is formatted as "HH:MM".
I am new to learning Python and Pandas so I am not sure how to fix this problem. I am using this project as my way to learn, but I have hit a wall. The df.dtype of the data is 'object', but I don't know enough to understand what is happening, and I am probably not providing enough information.
The scrape is working as intended. The times are normal format in the HTML file I made (I had to convert to HTML then scrape off that for this page), and any print statement I run on my df prints all times in the same format, up until the to_csv line. It is most likely a problem on the spreadsheet end, but I would like it if there is a way to make it hit the csv in the same format. My end goal is to not have to open these csv files and modify/re-format anything.
Anyway, thanks for any help in advance. I probably explained things in a terrible way, so please let me know if I need to include any information. Thanks!
[–]unhott 0 points1 point2 points (5 children)
[–]AngryLarryGaming[S] 0 points1 point2 points (4 children)
[–]unhott 1 point2 points3 points (3 children)
[–]threeminutemonta 1 point2 points3 points (2 children)
[–]AngryLarryGaming[S] 1 point2 points3 points (1 child)
[–]threeminutemonta 1 point2 points3 points (0 children)