question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proper formatting for DateTime Index

See original GitHub issue

As an extension to #2124, a warning can be included that assesses whether the date has been properly formatted. It might be useful to have certain default formats for dates that are passed in, such as mm/dd/YYYY %H:%M:%S.

For example, in some cases, Pandas will infer the year 55 as 2055 and then 77 as 1977. This would entirely misconstrue the timeline of data. Users should be encouraged to format their datetime column/index to include the full year.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dsherrycommented, May 6, 2021

@thehomebrewnerd thank you for that context. Good to know we have that support in woodwork currently.

I will close this and file a separate issue in woodwork to track a “smart inference” feature.

1reaction
gshenicommented, Apr 16, 2021

@dsherry @ParthivNaresh Would a Woodwork solution throw a warning/error if the datetime column is not properly formatted? Seems that we need a validation check for the Datetime Logical Type.

Read more comments on GitHub >

github_iconTop Results From Across the Web

pandas.DatetimeIndex.strftime — pandas 0.23.1 documentation
Return an Index of formatted strings specified by date_format, which supports the same string format as the python standard library.
Read more >
How do I properly set the Datetimeindex for a Pandas ...
To simplify Kirubaharan's answer a bit: df['Datetime'] = pd.to_datetime(df['date'] + ' ' + df['time']) df = df.set_index('Datetime').
Read more >
Tips on Working with Datetime Index in pandas - Sergi's Blog
Now when we have our data prepared we can play with Datetime Index. Selecting values. Although the default pandas datetime format is ISO8601...
Read more >
Datetimeindex format - Using Streamlit
I'm using Streamlit for my Python Data Science Web Projects. So far, so good. But, why I get this format on my DateTime...
Read more >
How to change the Pandas datetime format in Python?
The date-time default format is “YYYY-MM-DD”. Hence, December 8, 2020, in the date format will be presented as “2020-12-08”. The datetime format ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found