From dc15983bee72e8c79d8e07f5f9cf6dddaf02bb21 Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Mon, 22 Apr 2024 09:36:40 +0530 Subject: [PATCH 1/3] DOC: add return description and see also section to pandas.HDFStore.info --- pandas/io/pytables.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandas/io/pytables.py b/pandas/io/pytables.py index d7fc71d037f2d..c27a8fd6a7047 100644 --- a/pandas/io/pytables.py +++ b/pandas/io/pytables.py @@ -1688,6 +1688,12 @@ 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 -------- From 53149e452d68f06d9beb4d2db21dff61baa5955f Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Mon, 22 Apr 2024 09:41:53 +0530 Subject: [PATCH 2/3] DOC: add 2 df in the examples for pandas.HDFStore.info --- pandas/io/pytables.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pandas/io/pytables.py b/pandas/io/pytables.py index c27a8fd6a7047..89c6ac9a58382 100644 --- a/pandas/io/pytables.py +++ b/pandas/io/pytables.py @@ -1688,8 +1688,8 @@ 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. + 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 -------- @@ -1697,14 +1697,17 @@ def info(self) -> str: 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 File path: store.h5 - /data frame (shape->[2,2]) + /data1 frame (shape->[2,2]) + /data2 frame (shape->[2,2]) """ path = pprint_thing(self._path) output = f"{type(self)}\nFile path: {path}\n" From 121d06d5b1a41be587113ee6aeb6639e425179f6 Mon Sep 17 00:00:00 2001 From: Tuhin Sharma Date: Mon, 22 Apr 2024 09:43:27 +0530 Subject: [PATCH 3/3] DOC: remove pandas.HDFStore.info --- ci/code_checks.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index cabc25b5e0ba5..89f6992df2cbc 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -131,7 +131,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then -i "pandas.DatetimeTZDtype.tz SA01" \ -i "pandas.DatetimeTZDtype.unit SA01" \ -i "pandas.Grouper PR02" \ - -i "pandas.HDFStore.info RT03,SA01" \ -i "pandas.HDFStore.keys SA01" \ -i "pandas.HDFStore.put PR01,SA01" \ -i "pandas.HDFStore.select SA01" \