-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Json parametrize more2 #33163
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
Json parametrize more2 #33163
Conversation
with tm.ensure_clean("test.json") as path: | ||
for df in [ | ||
float_frame, | ||
self.intframe, | ||
self.tsframe, | ||
self.mixed_frame, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just removed mixed_frame
here as this is its only use in the module; doesn't seem important to re-create, and in its current state it was really the same thing as float_frame
anyway
LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, one small comment
pandas/conftest.py
Outdated
""" | ||
df = DataFrame({k: v.astype(int) for k, v in tm.getSeriesData().items()}) | ||
# force these all to int64 to avoid platform testing issues | ||
return DataFrame({c: s for c, s in df.items()}, dtype=np.int64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this could be done more directly as:
return DataFrame(tm.getSeriesData()).astype("int64")
I realize this was just moved as-is so could maybe wait for a follow-up but since the diff is relatively small I don't think it'd hurt to simplify while we're here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yea I agree - nice catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i assumed this had to do with the uniqueness mentioned in the docstring
Fixture for DataFrame of floats with DatetimeIndex | ||
|
||
Columns are ['A', 'B', 'C', 'D'] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doesn't this duplicate some existing fixtures?
@@ -526,6 +526,64 @@ def empty_frame(): | |||
return DataFrame() | |||
|
|||
|
|||
@pytest.fixture | |||
def int_frame(): | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this duplicate?
@jreback no to both comments - these are the only fixtures with those names |
kk |
No description provided.