-
-
Notifications
You must be signed in to change notification settings - Fork 141
Modernize IO using only the API #164
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
Conversation
chunksize = ... # Incomplete | ||
nrows = ... # Incomplete | ||
squeeze = ... # Incomplete | ||
handles = ... # Incomplete |
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 wouldn't mind removing those. Might be good to be in sync with @phofl's PR pandas-dev/pandas#46308
pandas-stubs/io/pickle.pyi
Outdated
obj, | ||
filepath_or_buffer: FilePathOrBuffer, | ||
compression: str | None = ..., | ||
obj: Any, |
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 object
might be better here than Any
. I think the rule of thumb is use object
if it can literally be any object and use Any
when it is too complex to type.
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.
Looking at typeshed they use Any
both ways for dump
and load
.
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.
Seems object can cause problems with type checking
https://stackoverflow.com/a/39817126/2551705
although this is probably more to do with loading than saving.
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.
Can you confirm that read_csv()
and read_table()
are the same as what was previously in parsers.pyi
?
Make pickle consistent with upstream pandas Only include what is in the API
Fully add read table and supporting classes
@bashtage might be easier to break it into multiple PRs: easier to review and probably also easier for you (less rebasing since the individual PRs will be closed more quickly) |
This is an attempt to modernize IO using only the API functions. Just a start