Skip to content

Commit b26f4ff

Browse files
committed
Merge remote-tracking branch 'upstream/main' into pre-commit-ci-update-config
2 parents d67e66f + a14a8be commit b26f4ff

File tree

9 files changed

+128
-87
lines changed

9 files changed

+128
-87
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ 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" \
@@ -105,15 +104,12 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
105104
-i "pandas.core.resample.Resampler.std SA01" \
106105
-i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \
107106
-i "pandas.core.resample.Resampler.var SA01" \
108-
-i "pandas.errors.IntCastingNaNError SA01" \
109107
-i "pandas.errors.NullFrequencyError SA01" \
110108
-i "pandas.errors.NumbaUtilError SA01" \
111109
-i "pandas.errors.PerformanceWarning SA01" \
112110
-i "pandas.errors.UndefinedVariableError PR01,SA01" \
113111
-i "pandas.errors.ValueLabelTypeMismatch SA01" \
114-
-i "pandas.infer_freq SA01" \
115112
-i "pandas.io.json.build_table_schema PR07,RT03,SA01" \
116-
-i "pandas.io.stata.StataWriter.write_file SA01" \
117113
-i "pandas.plotting.andrews_curves RT03,SA01" \
118114
-i "pandas.plotting.scatter_matrix PR07,SA01" \
119115
-i "pandas.tseries.offsets.BDay PR02,SA01" \

doc/source/getting_started/install.rst

Lines changed: 81 additions & 81 deletions
Large diffs are not rendered by default.

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/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)