-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: Create empty dataframe with string dtype fails #33651
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
Changes from 1 commit
82dc446
d1da8c8
66eda6a
ff26d95
92d75b7
0363ef0
5fcfed6
5ad5f8b
9e15301
e8e1ed1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -242,7 +242,10 @@ def init_dict(data, index, columns, dtype=None): | |
|
||
# no obvious "empty" int column | ||
if missing.any() and not is_integer_dtype(dtype): | ||
if dtype is None or np.issubdtype(dtype, np.flexible): | ||
if is_dtype_equal(dtype, "string"): | ||
# GH 33623 | ||
nan_dtype = dtype | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this will be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you update this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, I can't figure out how to fix this from "this will be dtype.na_value". There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
nan_dtype = dtype.na_value There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will change to
So I updated it like this.
|
||
elif dtype is None or np.issubdtype(dtype, np.flexible): | ||
# GH#1783 | ||
nan_dtype = object | ||
else: | ||
|
Uh oh!
There was an error while loading. Please reload this page.