Skip to content

Commit e032795

Browse files
authored
Merge branch 'main' into example
2 parents b996671 + a14a8be commit e032795

File tree

9 files changed

+56
-9
lines changed

9 files changed

+56
-9
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,22 +83,18 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
8383
-i "pandas.Timestamp.resolution PR02" \
8484
-i "pandas.Timestamp.tzinfo GL08" \
8585
-i "pandas.arrays.ArrowExtensionArray PR07,SA01" \
86-
-i "pandas.arrays.IntegerArray SA01" \
8786
-i "pandas.arrays.IntervalArray.length SA01" \
8887
-i "pandas.arrays.NumpyExtensionArray SA01" \
8988
-i "pandas.arrays.TimedeltaArray PR07,SA01" \
9089
-i "pandas.core.groupby.DataFrameGroupBy.boxplot PR07,RT03,SA01" \
9190
-i "pandas.core.groupby.DataFrameGroupBy.get_group RT03,SA01" \
92-
-i "pandas.core.groupby.DataFrameGroupBy.indices SA01" \
9391
-i "pandas.core.groupby.DataFrameGroupBy.nunique SA01" \
9492
-i "pandas.core.groupby.DataFrameGroupBy.plot PR02" \
9593
-i "pandas.core.groupby.DataFrameGroupBy.sem SA01" \
9694
-i "pandas.core.groupby.SeriesGroupBy.get_group RT03,SA01" \
97-
-i "pandas.core.groupby.SeriesGroupBy.indices SA01" \
9895
-i "pandas.core.groupby.SeriesGroupBy.plot PR02" \
9996
-i "pandas.core.groupby.SeriesGroupBy.sem SA01" \
10097
-i "pandas.core.resample.Resampler.get_group RT03,SA01" \
101-
-i "pandas.core.resample.Resampler.indices SA01" \
10298
-i "pandas.core.resample.Resampler.max PR01,RT03,SA01" \
10399
-i "pandas.core.resample.Resampler.mean SA01" \
104100
-i "pandas.core.resample.Resampler.min PR01,RT03,SA01" \
@@ -108,15 +104,12 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
108104
-i "pandas.core.resample.Resampler.std SA01" \
109105
-i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \
110106
-i "pandas.core.resample.Resampler.var SA01" \
111-
-i "pandas.errors.IntCastingNaNError SA01" \
112107
-i "pandas.errors.NullFrequencyError SA01" \
113108
-i "pandas.errors.NumbaUtilError SA01" \
114109
-i "pandas.errors.PerformanceWarning SA01" \
115110
-i "pandas.errors.UndefinedVariableError PR01,SA01" \
116111
-i "pandas.errors.ValueLabelTypeMismatch SA01" \
117-
-i "pandas.infer_freq SA01" \
118112
-i "pandas.io.json.build_table_schema PR07,RT03,SA01" \
119-
-i "pandas.io.stata.StataWriter.write_file SA01" \
120113
-i "pandas.plotting.andrews_curves RT03,SA01" \
121114
-i "pandas.plotting.scatter_matrix PR07,SA01" \
122115
-i "pandas.tseries.offsets.BDay PR02,SA01" \

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ dependencies:
8787
- google-auth
8888
- natsort # DataFrame.sort_values doctest
8989
- numpydoc
90-
- pydata-sphinx-theme=0.14
90+
- pydata-sphinx-theme=0.16
9191
- pytest-cython # doctest
9292
- sphinx
9393
- sphinx-design

pandas/_config/config.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,11 @@ def set_option(*args) -> None:
188188
"""
189189
Set the value of the specified option or options.
190190
191+
This method allows fine-grained control over the behavior and display settings
192+
of pandas. Options affect various functionalities such as output formatting,
193+
display limits, and operational behavior. Settings can be modified at runtime
194+
without requiring changes to global configurations or environment variables.
195+
191196
Parameters
192197
----------
193198
*args : str | object

pandas/core/arrays/integer.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ class IntegerArray(NumericArray):
105105
-------
106106
IntegerArray
107107
108+
See Also
109+
--------
110+
array : Create an array using the appropriate dtype, including ``IntegerArray``.
111+
Int32Dtype : An ExtensionDtype for int32 integer data.
112+
UInt16Dtype : An ExtensionDtype for uint16 integer data.
113+
108114
Examples
109115
--------
110116
Create an IntegerArray with :func:`pandas.array`.

pandas/core/groupby/groupby.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,15 @@ def indices(self) -> dict[Hashable, npt.NDArray[np.intp]]:
515515
"""
516516
Dict {group name -> group indices}.
517517
518+
See Also
519+
--------
520+
core.groupby.DataFrameGroupBy.indices : Provides a mapping of group rows to
521+
positions of the elements.
522+
core.groupby.SeriesGroupBy.indices : Provides a mapping of group rows to
523+
positions of the elements.
524+
core.resample.Resampler.indices : Provides a mapping of group rows to
525+
positions of the elements.
526+
518527
Examples
519528
--------
520529

pandas/errors/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ class IntCastingNaNError(ValueError):
2020
"""
2121
Exception raised when converting (``astype``) an array with NaN to an integer type.
2222
23+
This error occurs when attempting to cast a data structure containing non-finite
24+
values (such as NaN or infinity) to an integer data type. Integer types do not
25+
support non-finite values, so such conversions are explicitly disallowed to
26+
prevent silent data corruption or unexpected behavior.
27+
28+
See Also
29+
--------
30+
DataFrame.astype : Method to cast a pandas DataFrame object to a specified dtype.
31+
Series.astype : Method to cast a pandas Series object to a specified dtype.
32+
2333
Examples
2434
--------
2535
>>> pd.DataFrame(np.array([[1, np.nan], [2, 3]]), dtype="i8")

pandas/io/stata.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2748,6 +2748,18 @@ def write_file(self) -> None:
27482748
"""
27492749
Export DataFrame object to Stata dta format.
27502750
2751+
This method writes the contents of a pandas DataFrame to a `.dta` file
2752+
compatible with Stata. It includes features for handling value labels,
2753+
variable types, and metadata like timestamps and data labels. The output
2754+
file can then be read and used in Stata or other compatible statistical
2755+
tools.
2756+
2757+
See Also
2758+
--------
2759+
read_stata : Read Stata file into DataFrame.
2760+
DataFrame.to_stata : Export DataFrame object to Stata dta format.
2761+
io.stata.StataWriter : A class for writing Stata binary dta files.
2762+
27512763
Examples
27522764
--------
27532765
>>> df = pd.DataFrame(

pandas/tseries/frequencies.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,11 @@ def infer_freq(
8989
"""
9090
Infer the most likely frequency given the input index.
9191
92+
This method attempts to deduce the most probable frequency (e.g., 'D' for daily,
93+
'H' for hourly) from a sequence of datetime-like objects. It is particularly useful
94+
when the frequency of a time series is not explicitly set or known but can be
95+
inferred from its values.
96+
9297
Parameters
9398
----------
9499
index : DatetimeIndex, TimedeltaIndex, Series or array-like
@@ -106,6 +111,13 @@ def infer_freq(
106111
ValueError
107112
If there are fewer than three values.
108113
114+
See Also
115+
--------
116+
date_range : Return a fixed frequency DatetimeIndex.
117+
timedelta_range : Return a fixed frequency TimedeltaIndex with day as the default.
118+
period_range : Return a fixed frequency PeriodIndex.
119+
DatetimeIndex.freq : Return the frequency object if it is set, otherwise None.
120+
109121
Examples
110122
--------
111123
>>> idx = pd.date_range(start="2020/12/01", end="2020/12/30", periods=30)

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ gitdb
6262
google-auth
6363
natsort
6464
numpydoc
65-
pydata-sphinx-theme==0.14
65+
pydata-sphinx-theme==0.16
6666
pytest-cython
6767
sphinx
6868
sphinx-design

0 commit comments

Comments
 (0)