-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Typing: Narrow down types of arguments (NDFrame) #10 #52754
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
25b1dd9
improved specificationfor date_unit in to_json more precisely
mKlepsch 899e30f
improved specification mode in to_hdf
mKlepsch 297e3f0
added the Literal to complib of to_hdf
mKlepsch 348c02a
improved format for to_hdf
mKlepsch 1e5bc56
address PR review
mKlepsch 55c26ff
Merge branch 'main' into improved_NDframe
mKlepsch 6f5dfdb
Merge branch 'main' into improved_NDframe
mKlepsch cf56061
Merge branch 'main' into improved_NDframe
mKlepsch 837f7ed
Update generic.py
mKlepsch ceb00ad
Merge branch 'main' into improved_NDframe
mKlepsch c488ac8
ran "pre-commit" to fix trailing whitespace
mKlepsch d46f708
Merge branch 'main' into improved_NDframe
mKlepsch e6db442
Merge branch 'main' into improved_NDframe
mKlepsch 3c6b508
Merge branch 'main' into improved_NDframe
mKlepsch 9ec17bb
Merge branch 'main' into improved_NDframe
mKlepsch e9f2d30
Merge branch 'main' into improved_NDframe
mKlepsch File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2276,7 +2276,7 @@ def to_json( | |
date_format: str | None = None, | ||
double_precision: int = 10, | ||
force_ascii: bool_t = True, | ||
date_unit: str = "ms", | ||
date_unit: Literal["s", "ms", "us", "ns"] = "ms", | ||
default_handler: Callable[[Any], JSONSerializable] | None = None, | ||
lines: bool_t = False, | ||
compression: CompressionOptions = "infer", | ||
|
@@ -2556,11 +2556,11 @@ def to_hdf( | |
self, | ||
path_or_buf: FilePath | HDFStore, | ||
key: str, | ||
mode: str = "a", | ||
mode: Literal["a", "w", "r+"] = "a", | ||
complevel: int | None = None, | ||
complib: str | None = None, | ||
complib: ["zlib", "lzo", "bzip2", "blosc"] | None = None, | ||
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. missing literal 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. change addressed problems |
||
append: bool_t = False, | ||
format: str | None = None, | ||
format: Literal["fixed", "table"] | None = None, | ||
index: bool_t = True, | ||
min_itemsize: int | dict[str, int] | None = None, | ||
nan_rep=None, | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
this one seems broadly useful - perhaps let's define it as
TimeUnit
in_typing.py
and import it here?