-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
QST:Somehow parse dates in pandas is messing the data as shown here: https://youtu.be/m_4pbEyXSds #42793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please probide a copy pastable example |
Here is the code I am using (I do not get any errors when I run it):
Please let me know if you would like me to upload sample data? |
We need a minimal and reproducible example where you provide the actual output and what you would expect. Please read https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports and provide your example accordingly |
Please find attached here the input file to the code above and it gives you the same error as shown in the YouTube link: https://www.youtube.com/watch?v=m_4pbEyXSds |
Could you please check the provided link and give an example accordingly? |
If someone wants to fix this, he will have to debug the code. Therefore a minimal example is required which clearly shows the error and does not confuse with too much data. You can search the IO Csv Tag in our issues to have a look at other examples for the IO methods or simply read the blog post. There are a lot of examples. |
As the document says "Lets be clear, this is hard and takes time." ; and I wish I had some more of it :) Thanks anyway!! I just hope other researchers are taking care while plotting their data using the parse dates while reading CSVs. Cheers! |
Hi @sv1900 You should use
If you believe there's a bug in pandas, please let us know, include a reproducible example, and we'll reopen - for the future, please note that usage questions are encouraged to be asked on StackOverflow |
@MarcoGorelli Thanks much for your reply. I think "use dayfirst=True," is not a good solution since in the first place no error is thrown for parse dates without this argument. Why - Because if there is no error thrown and the labels/plot looks almost similar to expected dates with the date.index.dtype confirming that; then: in my opinion it becomes a dangerous proposition to the general user/ researcher using this tool to plot their data without having second thoughts about validating the same. I would either change the function such that it throws an error if the dates are not read correctly despite that python works very well since it is forgiving. I've used R to plot the same - and it throws an error/ will not confirm the class unless the dates are converted 100%. I would actually think it is wise to ask all researchers who have used this tool to double check their plots. |
Yeah, there's an open issue about this #12585 I'd love to address this issue when I get a chance, this |
But you're still alive - so it has hopefully made you stronger; Thanks again; cheers!! - Samir Vinchurkar |
I have searched the [pandas] tag on StackOverflow for similar questions.
I have asked my usage related question on StackOverflow.
Question about pandas
Note: If you'd still like to submit a question, please read this guide detailing how to provide the necessary information for us to reproduce your question.
# Your code here, if applicable
The text was updated successfully, but these errors were encountered: