From 12eafb1de3a327bc28977d6c443fe3e1a3d989c8 Mon Sep 17 00:00:00 2001 From: Jordan Murphy <35613487+jordan-d-murphy@users.noreply.github.com> Date: Sun, 10 Mar 2024 17:20:38 -0600 Subject: [PATCH] fix PR07 errors in DatetimeIndex - indexer_between_time, mean and HDFStore - append, get, put --- ci/code_checks.sh | 5 ----- pandas/core/arrays/datetimelike.py | 1 + pandas/core/indexes/datetimes.py | 2 ++ pandas/io/pytables.py | 20 +++++++++++++++----- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/ci/code_checks.sh b/ci/code_checks.sh index c4e43b88a0097..68fd2f6b281e8 100755 --- a/ci/code_checks.sh +++ b/ci/code_checks.sh @@ -502,11 +502,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then pandas.DataFrame.get\ pandas.DataFrame.rolling\ pandas.DataFrame.to_hdf\ - pandas.DatetimeIndex.indexer_between_time\ - pandas.DatetimeIndex.mean\ - pandas.HDFStore.append\ - pandas.HDFStore.get\ - pandas.HDFStore.put\ pandas.Index\ pandas.Index.append\ pandas.Index.copy\ diff --git a/pandas/core/arrays/datetimelike.py b/pandas/core/arrays/datetimelike.py index dd7274c3d79f7..ba2c936b75d9e 100644 --- a/pandas/core/arrays/datetimelike.py +++ b/pandas/core/arrays/datetimelike.py @@ -1577,6 +1577,7 @@ def mean(self, *, skipna: bool = True, axis: AxisInt | None = 0): skipna : bool, default True Whether to ignore any NaT elements. axis : int, optional, default 0 + Axis for the function to be applied on. Returns ------- diff --git a/pandas/core/indexes/datetimes.py b/pandas/core/indexes/datetimes.py index b7d2437cbaa44..4f9c810cc7e1d 100644 --- a/pandas/core/indexes/datetimes.py +++ b/pandas/core/indexes/datetimes.py @@ -774,7 +774,9 @@ def indexer_between_time( appropriate format ("%H:%M", "%H%M", "%I:%M%p", "%I%M%p", "%H:%M:%S", "%H%M%S", "%I:%M:%S%p","%I%M%S%p"). include_start : bool, default True + Include boundaries; whether to set start bound as closed or open. include_end : bool, default True + Include boundaries; whether to set end bound as closed or open. Returns ------- diff --git a/pandas/io/pytables.py b/pandas/io/pytables.py index e804c1b751d4a..5ecf7e287ea58 100644 --- a/pandas/io/pytables.py +++ b/pandas/io/pytables.py @@ -779,6 +779,7 @@ def get(self, key: str): Parameters ---------- key : str + Object to retrieve from file. Raises KeyError if not found. Returns ------- @@ -1110,7 +1111,9 @@ def put( Parameters ---------- key : str + Key of object to store in file. value : {Series, DataFrame} + Value of object to store in file. format : 'fixed(f)|table(t)', default is 'fixed' Format to use when storing object in HDFStore. Value can be one of: @@ -1248,7 +1251,9 @@ def append( Parameters ---------- key : str + Key of object to append. value : {Series, DataFrame} + Value of object to append. format : 'table' is the default Format to use when storing object in HDFStore. Value can be one of: @@ -1265,11 +1270,16 @@ def append( queries, or True to use all columns. By default only the axes of the object are indexed. See `here `__. - min_itemsize : dict of columns that specify minimum str sizes - nan_rep : str to use as str nan representation - chunksize : size to chunk the writing - expectedrows : expected TOTAL row size of this table - encoding : default None, provide an encoding for str + min_itemsize : int, dict, or None + Dict of columns that specify minimum str sizes. + nan_rep : str + Str to use as str nan representation. + chunksize : int or None + Size to chunk the writing. + expectedrows : int + Expected TOTAL row size of this table. + encoding : default None + Provide an encoding for str. dropna : bool, default False, optional Do not write an ALL nan row to the store settable by the option 'io.hdf.dropna_table'.