-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
API: honor copy=True when passing dict to DataFrame #38939
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 21 commits
cbc97f0
a135d96
5c94129
d653c54
e71e319
cafa718
c706ad6
3f9195e
1cba671
396daba
11ae1c9
b505267
a1e9b68
b70d997
09213e0
e895de0
31bda58
37a2c0c
b93d7d5
aa667a6
185cd99
701356f
948ac67
46f2fcf
0bbfec0
590c820
17a693c
fb8f32d
7835184
2136289
187499c
6f30beb
e80d57c
b0a6abd
bf942ae
95e30a5
510f697
48e359e
048e826
6a9c9f0
a17c728
5b3d419
f961378
fcee44b
0c60ae8
1468e59
b6d8b70
8b66b11
54cacfc
5ea7a75
e11ea68
65d01c7
41c4e7a
7260a72
52344bb
3ddc3d3
e6bae0f
7cab084
e8e3d84
5c44953
e32f630
abd890a
1b7f7ca
b326b5f
b7aed5d
4d20fe7
ad5485a
6bed6ac
98b6dff
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 |
---|---|---|
|
@@ -473,7 +473,7 @@ def getPeriodData(nper=None): | |
# make frame | ||
def makeTimeDataFrame(nper=None, freq="B"): | ||
data = getTimeSeriesData(nper, freq) | ||
return DataFrame(data) | ||
return DataFrame(data)._consolidate() | ||
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 change should in theory no longer be needed? (assuming this was done to ensure consolidated dataframe when the default was changed to not copy, and thus result in non-consolidated dataframe) (and same for the 2 cases just below) |
||
|
||
|
||
def makeDataFrame() -> DataFrame: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1305,7 +1305,7 @@ def test_strings_to_numbers_comparisons_raises(self, compare_operators_no_eq_ne) | |
f(df, 0) | ||
|
||
def test_comparison_protected_from_errstate(self): | ||
missing_df = tm.makeDataFrame() | ||
missing_df = tm.makeDataFrame()._consolidate() | ||
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. you are already doing this on the creation (I understand by find this fragile) 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.
i dont think so
I agree. Silver lining: finding the existing fragility. 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. actuallly you are doing this on creation, maybe you recently added. prefer NOT to do this in the tests proper (in pandas/testing is ok) 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. updated to do the consolidation in tm.makeDataFrame |
||
missing_df.iloc[0]["A"] = np.nan | ||
with np.errstate(invalid="ignore"): | ||
expected = missing_df.values < 0 | ||
|
Uh oh!
There was an error while loading. Please reload this page.