-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Enforce Numpy Docstring Validation for pandas.HDFStore.info #58368
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 all commits
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 |
---|---|---|
|
@@ -1688,17 +1688,26 @@ def info(self) -> str: | |
Returns | ||
------- | ||
str | ||
A String containing the python pandas class name, filepath to the HDF5 | ||
file and all the object keys along with their respective dataframe shapes. | ||
|
||
See Also | ||
-------- | ||
HDFStore.get_storer : Returns the storer object for a key. | ||
|
||
Examples | ||
-------- | ||
>>> df = pd.DataFrame([[1, 2], [3, 4]], columns=["A", "B"]) | ||
>>> df1 = pd.DataFrame([[1, 2], [3, 4]], columns=["A", "B"]) | ||
>>> df2 = pd.DataFrame([[5, 6], [7, 8]], columns=["C", "D"]) | ||
>>> store = pd.HDFStore("store.h5", "w") # doctest: +SKIP | ||
>>> store.put("data", df) # doctest: +SKIP | ||
>>> store.put("data1", df1) # doctest: +SKIP | ||
>>> store.put("data2", df2) # doctest: +SKIP | ||
>>> print(store.info()) # doctest: +SKIP | ||
>>> store.close() # doctest: +SKIP | ||
<class 'pandas.io.pytables.HDFStore'> | ||
File path: store.h5 | ||
/data frame (shape->[2,2]) | ||
/data1 frame (shape->[2,2]) | ||
/data2 frame (shape->[2,2]) | ||
""" | ||
Comment on lines
1697
to
1711
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. @mroeschke I took the liberty to refine the example by adding one more dataframe. Let me know if this is good or I need to revert back. 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. Sure thanks for the addition |
||
path = pprint_thing(self._path) | ||
output = f"{type(self)}\nFile path: {path}\n" | ||
|
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.
@mroeschke I could not find a closer method than this.