Skip to content

Commit a394412

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 3c377a3 commit a394412

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
@@ -592,7 +592,7 @@ def swapaxes(self: FrameOrSeries, axis1, axis2, copy=True) -> FrameOrSeries:
592592

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

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

40494049
mapper = {self._info_axis_name: f}
4050-
return self.rename(**mapper) # type: ignore
4050+
return self.rename(**mapper)
40514051

40524052
def add_suffix(self: FrameOrSeries, suffix: str) -> FrameOrSeries:
40534053
"""
@@ -4106,7 +4106,7 @@ def add_suffix(self: FrameOrSeries, suffix: str) -> FrameOrSeries:
41064106
f = functools.partial("{}{suffix}".format, suffix=suffix)
41074107

41084108
mapper = {self._info_axis_name: f}
4109-
return self.rename(**mapper) # type: ignore
4109+
return self.rename(**mapper)
41104110

41114111
def sort_values(
41124112
self,
@@ -6679,9 +6679,9 @@ def replace(
66796679
values of the index. Both 'polynomial' and 'spline' require that
66806680
you also specify an `order` (int), e.g.
66816681
``df.interpolate(method='polynomial', order=5)``.
6682-
* 'krogh', 'piecewise_polynomial', 'spline', 'pchip', 'akima':
6683-
Wrappers around the SciPy interpolation methods of similar
6684-
names. See `Notes`.
6682+
* 'krogh', 'piecewise_polynomial', 'spline', 'pchip', 'akima',
6683+
'cubicspline': Wrappers around the SciPy interpolation methods of
6684+
similar names. See `Notes`.
66856685
* 'from_derivatives': Refers to
66866686
`scipy.interpolate.BPoly.from_derivatives` which
66876687
replaces 'piecewise_polynomial' interpolation method in

0 commit comments

Comments
 (0)