-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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
BUG: Segmentation fault when JSON serializing a PeriodIndex #46683
Comments
The |
take |
I note this is closed but import pandas as pd
df = pd.DataFrame(
dict(
A=[1, 2, 12],
Date=pd.period_range("2000-01-01", periods=3),
)
)
df.to_json() Result:
Is this a regression, should I create a new issue? |
That appears to be a separate issue, where serializing a dataframe with a PeriodArray errors. Serializing a PeriodIndex has continued to work (the fix included a test for a period in the index). I've started a separate bug report for PeriodArray at #58236. |
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
Expected Behavior
The code above should run without segfaulting.
Installed Versions
The text was updated successfully, but these errors were encountered: