Skip to content

Commit 7213e49

Browse files
committed
Add whatsnew entry and update the docs
Changes to be committed: modified: doc/source/whatsnew/v1.1.0.rst modified: pandas/core/generic.py
1 parent 487fa7f commit 7213e49

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

doc/source/whatsnew/v1.1.0.rst

+1
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ Other enhancements
9999
``df.to_csv(path, compression={'method': 'gzip', 'compresslevel': 1}``
100100
(:issue:`33196`)
101101
- :meth:`~pandas.core.groupby.GroupBy.transform` has gained ``engine`` and ``engine_kwargs`` arguments that supports executing functions with ``Numba`` (:issue:`32854`)
102+
- :meth:`~pandas.core.resample.Resampler.interpolate` now supports SciPy interpolation method :class:`scipy.interpolate.CubicSpline` as method ``cubicspline``
102103
-
103104

104105
.. ---------------------------------------------------------------------------

pandas/core/generic.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ def swapaxes(self: FrameOrSeries, axis1, axis2, copy=True) -> FrameOrSeries:
591591

592592
# ignore needed because of NDFrame constructor is different than
593593
# DataFrame/Series constructors.
594-
return self._constructor(new_values, *new_axes).__finalize__( # type: ignore
594+
return self._constructor(new_values, *new_axes).__finalize__(
595595
self, method="swapaxes"
596596
)
597597

@@ -4039,7 +4039,7 @@ def add_prefix(self: FrameOrSeries, prefix: str) -> FrameOrSeries:
40394039
f = functools.partial("{prefix}{}".format, prefix=prefix)
40404040

40414041
mapper = {self._info_axis_name: f}
4042-
return self.rename(**mapper) # type: ignore
4042+
return self.rename(**mapper)
40434043

40444044
def add_suffix(self: FrameOrSeries, suffix: str) -> FrameOrSeries:
40454045
"""
@@ -4098,7 +4098,7 @@ def add_suffix(self: FrameOrSeries, suffix: str) -> FrameOrSeries:
40984098
f = functools.partial("{}{suffix}".format, suffix=suffix)
40994099

41004100
mapper = {self._info_axis_name: f}
4101-
return self.rename(**mapper) # type: ignore
4101+
return self.rename(**mapper)
41024102

41034103
def sort_values(
41044104
self,
@@ -6671,9 +6671,9 @@ def replace(
66716671
values of the index. Both 'polynomial' and 'spline' require that
66726672
you also specify an `order` (int), e.g.
66736673
``df.interpolate(method='polynomial', order=5)``.
6674-
* 'krogh', 'piecewise_polynomial', 'spline', 'pchip', 'akima':
6675-
Wrappers around the SciPy interpolation methods of similar
6676-
names. See `Notes`.
6674+
* 'krogh', 'piecewise_polynomial', 'spline', 'pchip', 'akima',
6675+
'cubicspline': Wrappers around the SciPy interpolation methods of
6676+
similar names. See `Notes`.
66776677
* 'from_derivatives': Refers to
66786678
`scipy.interpolate.BPoly.from_derivatives` which
66796679
replaces 'piecewise_polynomial' interpolation method in

0 commit comments

Comments
 (0)