NaT in date columns make histograme go crazy
See original GitHub issueHello,
I am referencing issue 111, which happens again in version 2.8.0
import pandas as pd
import pandas_profiling
import numpy as np
def test_issue_111():
years = pd.Series(["{:02d}/01/{}".format(x, y) for x in range(1989, 2020) for y in range(1, 30)])
df = pd.DataFrame(np.random.randint(0, len(years), size=(len(years), 4)), columns=list('ABCD'))
df['E'] = pd.to_datetime(years)
df['E'].iloc[10:100] = pd.NaT
report = df.profile_report()
report.to_file('test.html')
_From the post by @sbrugman in https://github.com/pandas-profiling/pandas-profiling/issues/111#issuecomment-497034063_
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
NaT in date columns make histograme go crazy #111 - GitHub
I noticed that when a date columns contains missing values NaT the histogram shows them at a date around 1670. That makes the...
Read more >date column in python has more NAT values [duplicate]
I am learning Python for Data Science. I have dataset with date column having more NaT values. How to get it replaced or...
Read more >pyspark.pandas.to_datetime - Apache Spark
Passing errors='coerce' will force an out-of-bounds date to NaT, in addition to forcing non-dates (or non-parseable dates) to NaT.
Read more >Essential basic functionality — pandas 1.5.2 documentation
pandas objects ( Index , Series , DataFrame ) can be thought of as containers for arrays, which hold the actual data and...
Read more >The pandas DataFrame Object - Cheat Sheet
Typically, the column index (df.columns) is a list of ... Get a DataFrame from data in a Python dictionary ... 2nd example returns...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@sbrugman, I tested it and it works, thank you.
The v2.9.0rc1 release is out, and should resolve this issue. Until this version is fully released, you can install it via pip in the following way:
It would be very helpful to know if the release candidate adequately solves the issue.