Skip to content

Commit

Permalink
Merge branch 'pandas-dev:main' into series-sum-attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
fbourgey authored Dec 2, 2024
2 parents 5b71171 + a14a8be commit 8da62bd
Show file tree
Hide file tree
Showing 9 changed files with 128 additions and 87 deletions.
4 changes: 0 additions & 4 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Timestamp.resolution PR02" \
-i "pandas.Timestamp.tzinfo GL08" \
-i "pandas.arrays.ArrowExtensionArray PR07,SA01" \
-i "pandas.arrays.IntegerArray SA01" \
-i "pandas.arrays.IntervalArray.length SA01" \
-i "pandas.arrays.NumpyExtensionArray SA01" \
-i "pandas.arrays.TimedeltaArray PR07,SA01" \
Expand All @@ -105,15 +104,12 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.core.resample.Resampler.std SA01" \
-i "pandas.core.resample.Resampler.transform PR01,RT03,SA01" \
-i "pandas.core.resample.Resampler.var SA01" \
-i "pandas.errors.IntCastingNaNError SA01" \
-i "pandas.errors.NullFrequencyError SA01" \
-i "pandas.errors.NumbaUtilError SA01" \
-i "pandas.errors.PerformanceWarning SA01" \
-i "pandas.errors.UndefinedVariableError PR01,SA01" \
-i "pandas.errors.ValueLabelTypeMismatch SA01" \
-i "pandas.infer_freq SA01" \
-i "pandas.io.json.build_table_schema PR07,RT03,SA01" \
-i "pandas.io.stata.StataWriter.write_file SA01" \
-i "pandas.plotting.andrews_curves RT03,SA01" \
-i "pandas.plotting.scatter_matrix PR07,SA01" \
-i "pandas.tseries.offsets.BDay PR02,SA01" \
Expand Down
162 changes: 81 additions & 81 deletions doc/source/getting_started/install.rst

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ dependencies:
- google-auth
- natsort # DataFrame.sort_values doctest
- numpydoc
- pydata-sphinx-theme=0.14
- pydata-sphinx-theme=0.16
- pytest-cython # doctest
- sphinx
- sphinx-design
Expand Down
5 changes: 5 additions & 0 deletions pandas/_config/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,11 @@ def set_option(*args) -> None:
"""
Set the value of the specified option or options.
This method allows fine-grained control over the behavior and display settings
of pandas. Options affect various functionalities such as output formatting,
display limits, and operational behavior. Settings can be modified at runtime
without requiring changes to global configurations or environment variables.
Parameters
----------
*args : str | object
Expand Down
6 changes: 6 additions & 0 deletions pandas/core/arrays/integer.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,12 @@ class IntegerArray(NumericArray):
-------
IntegerArray
See Also
--------
array : Create an array using the appropriate dtype, including ``IntegerArray``.
Int32Dtype : An ExtensionDtype for int32 integer data.
UInt16Dtype : An ExtensionDtype for uint16 integer data.
Examples
--------
Create an IntegerArray with :func:`pandas.array`.
Expand Down
10 changes: 10 additions & 0 deletions pandas/errors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@ class IntCastingNaNError(ValueError):
"""
Exception raised when converting (``astype``) an array with NaN to an integer type.
This error occurs when attempting to cast a data structure containing non-finite
values (such as NaN or infinity) to an integer data type. Integer types do not
support non-finite values, so such conversions are explicitly disallowed to
prevent silent data corruption or unexpected behavior.
See Also
--------
DataFrame.astype : Method to cast a pandas DataFrame object to a specified dtype.
Series.astype : Method to cast a pandas Series object to a specified dtype.
Examples
--------
>>> pd.DataFrame(np.array([[1, np.nan], [2, 3]]), dtype="i8")
Expand Down
12 changes: 12 additions & 0 deletions pandas/io/stata.py
Original file line number Diff line number Diff line change
Expand Up @@ -2748,6 +2748,18 @@ def write_file(self) -> None:
"""
Export DataFrame object to Stata dta format.
This method writes the contents of a pandas DataFrame to a `.dta` file
compatible with Stata. It includes features for handling value labels,
variable types, and metadata like timestamps and data labels. The output
file can then be read and used in Stata or other compatible statistical
tools.
See Also
--------
read_stata : Read Stata file into DataFrame.
DataFrame.to_stata : Export DataFrame object to Stata dta format.
io.stata.StataWriter : A class for writing Stata binary dta files.
Examples
--------
>>> df = pd.DataFrame(
Expand Down
12 changes: 12 additions & 0 deletions pandas/tseries/frequencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ def infer_freq(
"""
Infer the most likely frequency given the input index.
This method attempts to deduce the most probable frequency (e.g., 'D' for daily,
'H' for hourly) from a sequence of datetime-like objects. It is particularly useful
when the frequency of a time series is not explicitly set or known but can be
inferred from its values.
Parameters
----------
index : DatetimeIndex, TimedeltaIndex, Series or array-like
Expand All @@ -106,6 +111,13 @@ def infer_freq(
ValueError
If there are fewer than three values.
See Also
--------
date_range : Return a fixed frequency DatetimeIndex.
timedelta_range : Return a fixed frequency TimedeltaIndex with day as the default.
period_range : Return a fixed frequency PeriodIndex.
DatetimeIndex.freq : Return the frequency object if it is set, otherwise None.
Examples
--------
>>> idx = pd.date_range(start="2020/12/01", end="2020/12/30", periods=30)
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ gitdb
google-auth
natsort
numpydoc
pydata-sphinx-theme==0.14
pydata-sphinx-theme==0.16
pytest-cython
sphinx
sphinx-design
Expand Down

0 comments on commit 8da62bd

Please sign in to comment.