-
-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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
ExtensionBlock.take_nd crashes in 1.1.0 #35768
Comments
pls show a user facing example |
Sure. Grab branches.pickle.gz, then run:
|
@vmarkovtsev can you give an example that we can just copy/paste? |
I can inline that 2KB pickle file as a bytes literal @jbrockmendel. It comes directly from a database. If you are afraid of loading foreign pickles and are not familiar with docker/VMs, I can dump it as CSV. |
Pickle safety is a concern, but mainly its the fact that we have 3500 issues to deal with, so making your issue simple to reproduce increases the odds of it getting looked at in a timely manner. https://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports |
Pfff, I have a simple workaround, so whatever. |
I've managed to reproduce this. This is related to pull request #37023, and issues #36953 and #35509. The issue was fixed in release 1.1.2, and is present in 1.1.1. import pandas as pd
import datetime
from io import StringIO
csv = """a,b
a,2021-01-01 08:00:00+00:00
a,2021-01-01 08:00:00+00:00
a,2021-01-01 08:00:00+00:00
a,2021-01-01 08:00:00+00:00
a,2021-01-01 08:00:00+00:00"""
df = pd.read_csv(StringIO(csv))
df['b'] = pd.to_datetime(df['b'])
df['b'].replace(0, pd.NaT, inplace=True)
print(*df.groupby("a"))
print(df, df.info(verbose=True)) This code reproduces the above exception. If the groupby() call is commented out, another exception is raised in .info(): The timezone piece of the datetime seems required to trigger the bug, strangely enough. |
pandas/pandas/core/internals/blocks.py
Line 1718 in 934e9f8
I've got
self.values
of typepd.Series
withpd.Timestamp
-s, and that does not havefill_value
andallow_fill
, so the kwargs check fails.It appeared due to
The text was updated successfully, but these errors were encountered: