Skip to content

Commit

Permalink
Merge branch 'main' into fix/grouby_agg_dict_input_dup_columns
Browse files Browse the repository at this point in the history
  • Loading branch information
undermyumbrella1 committed Apr 28, 2024
2 parents e8f3172 + a1fc8e8 commit b2ee3b4
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 9 deletions.
9 changes: 0 additions & 9 deletions ci/code_checks.sh
Expand Up @@ -100,26 +100,19 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.DataFrame.var PR01,RT03,SA01" \
-i "pandas.DatetimeIndex.indexer_at_time PR01,RT03" \
-i "pandas.DatetimeIndex.snap PR01,RT03" \
-i "pandas.DatetimeIndex.std PR01,RT03" \
-i "pandas.DatetimeIndex.to_period RT03" \
-i "pandas.DatetimeIndex.to_pydatetime RT03,SA01" \
-i "pandas.DatetimeTZDtype SA01" \
-i "pandas.Grouper PR02" \
-i "pandas.Index PR07" \
-i "pandas.Index.append PR07,RT03,SA01" \
-i "pandas.Index.copy PR07,SA01" \
-i "pandas.Index.difference PR07,RT03,SA01" \
-i "pandas.Index.drop PR07,SA01" \
-i "pandas.Index.droplevel RT03,SA01" \
-i "pandas.Index.dropna RT03,SA01" \
-i "pandas.Index.duplicated RT03" \
-i "pandas.Index.get_indexer PR07,SA01" \
-i "pandas.Index.get_indexer_for PR01,SA01" \
-i "pandas.Index.get_indexer_non_unique PR07,SA01" \
-i "pandas.Index.get_loc PR07,RT03,SA01" \
-i "pandas.Index.get_slice_bound PR07" \
-i "pandas.Index.identical PR01,SA01" \
-i "pandas.Index.inferred_type SA01" \
-i "pandas.Index.insert PR07,RT03,SA01" \
-i "pandas.Index.intersection PR07,RT03,SA01" \
-i "pandas.Index.join PR07,RT03,SA01" \
Expand All @@ -129,7 +122,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Index.ravel PR01,RT03" \
-i "pandas.Index.reindex PR07" \
-i "pandas.Index.slice_indexer PR07,RT03,SA01" \
-i "pandas.Index.slice_locs RT03" \
-i "pandas.Index.str PR01,SA01" \
-i "pandas.Index.symmetric_difference PR07,RT03,SA01" \
-i "pandas.Index.take PR01,PR07" \
Expand Down Expand Up @@ -161,7 +153,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.MultiIndex.append PR07,SA01" \
-i "pandas.MultiIndex.copy PR07,RT03,SA01" \
-i "pandas.MultiIndex.drop PR07,RT03,SA01" \
-i "pandas.MultiIndex.droplevel RT03,SA01" \
-i "pandas.MultiIndex.dtypes SA01" \
-i "pandas.MultiIndex.get_indexer PR07,SA01" \
-i "pandas.MultiIndex.get_level_values SA01" \
Expand Down
17 changes: 17 additions & 0 deletions pandas/core/arrays/datetimes.py
Expand Up @@ -2248,16 +2248,33 @@ def std(
axis : int, optional
Axis for the function to be applied on. For :class:`pandas.Series`
this parameter is unused and defaults to ``None``.
dtype : dtype, optional, default None
Type to use in computing the standard deviation. For arrays of
integer type the default is float64, for arrays of float types
it is the same as the array type.
out : ndarray, optional, default None
Alternative output array in which to place the result. It must have
the same shape as the expected output but the type (of the
calculated values) will be cast if necessary.
ddof : int, default 1
Degrees of Freedom. The divisor used in calculations is `N - ddof`,
where `N` represents the number of elements.
keepdims : bool, optional
If this is set to True, the axes which are reduced are left in the
result as dimensions with size one. With this option, the result
will broadcast correctly against the input array. If the default
value is passed, then keepdims will not be passed through to the
std method of sub-classes of ndarray, however any non-default value
will be. If the sub-class method does not implement keepdims any
exceptions will be raised.
skipna : bool, default True
Exclude NA/null values. If an entire row/column is ``NA``, the result
will be ``NA``.
Returns
-------
Timedelta
Standard deviation over requested axis.
See Also
--------
Expand Down
5 changes: 5 additions & 0 deletions pandas/core/dtypes/dtypes.py
Expand Up @@ -717,6 +717,11 @@ class DatetimeTZDtype(PandasExtensionDtype):
ZoneInfoNotFoundError
When the requested timezone cannot be found.
See Also
--------
numpy.datetime64 : Numpy data type for datetime.
datetime.datetime : Python datetime object.
Examples
--------
>>> from zoneinfo import ZoneInfo
Expand Down
28 changes: 28 additions & 0 deletions pandas/core/indexes/base.py
Expand Up @@ -1262,12 +1262,19 @@ def copy(
name : Label, optional
Set name for new object.
deep : bool, default False
If True attempts to make a deep copy of the Index.
Else makes a shallow copy.
Returns
-------
Index
Index refer to new object which is a copy of this object.
See Also
--------
Index.delete: Make new Index with passed location(-s) deleted.
Index.drop: Make new Index with passed list of labels deleted.
Notes
-----
In most cases, there should be no functional difference from using
Expand Down Expand Up @@ -2093,6 +2100,12 @@ def droplevel(self, level: IndexLabel = 0):
Returns
-------
Index or MultiIndex
Returns an Index or MultiIndex object, depending on the resulting index
after removing the requested level(s).
See Also
--------
Index.dropna : Return Index without NA/NaN values.
Examples
--------
Expand Down Expand Up @@ -2360,6 +2373,10 @@ def inferred_type(self) -> str_t:
"""
Return a string of the type inferred from the values.
See Also
--------
Index.dtype : Return the dtype object of the underlying data.
Examples
--------
>>> idx = pd.Index([1, 2, 3])
Expand Down Expand Up @@ -2615,6 +2632,12 @@ def dropna(self, how: AnyAll = "any") -> Self:
Returns
-------
Index
Returns an Index object after removing NA/NaN values.
See Also
--------
Index.fillna : Fill NA/NaN values with the specified value.
Index.isna : Detect missing values.
Examples
--------
Expand Down Expand Up @@ -6382,7 +6405,10 @@ def get_slice_bound(self, label, side: Literal["left", "right"]) -> int:
Parameters
----------
label : object
The label for which to calculate the slice bound.
side : {'left', 'right'}
if 'left' return leftmost position of given label.
if 'right' return one-past-the-rightmost position of given label.
Returns
-------
Expand Down Expand Up @@ -6471,6 +6497,8 @@ def slice_locs(self, start=None, end=None, step=None) -> tuple[int, int]:
Returns
-------
tuple[int, int]
Returns a tuple of two integers representing the slice locations for the
input labels within the index.
See Also
--------
Expand Down

0 comments on commit b2ee3b4

Please sign in to comment.