File tree 5 files changed +74
-2
lines changed
5 files changed +74
-2
lines changed Original file line number Diff line number Diff line change @@ -1054,6 +1054,12 @@ cdef class _Timedelta(timedelta):
1054
1054
1055
1055
@property
1056
1056
def freq(self ) -> None:
1057
+ """
1058
+ Freq property.
1059
+
1060
+ .. deprecated:: 1.5.0
1061
+ This argument is deprecated.
1062
+ """
1057
1063
# GH#46430
1058
1064
warnings.warn(
1059
1065
"Timedelta.freq is deprecated and will be removed in a future version",
@@ -1064,6 +1070,12 @@ cdef class _Timedelta(timedelta):
1064
1070
1065
1071
@property
1066
1072
def is_populated(self ) -> bool:
1073
+ """
1074
+ Is_populated property.
1075
+
1076
+ .. deprecated:: 1.5.0
1077
+ This argument is deprecated.
1078
+ """
1067
1079
# GH#46430
1068
1080
warnings.warn(
1069
1081
"Timedelta.is_populated is deprecated and will be removed in a future version",
@@ -1245,6 +1257,9 @@ cdef class _Timedelta(timedelta):
1245
1257
"""
1246
1258
Return the timedelta in nanoseconds (ns), for internal compatibility.
1247
1259
1260
+ .. deprecated:: 1.5.0
1261
+ This argument is deprecated.
1262
+
1248
1263
Returns
1249
1264
-------
1250
1265
int
Original file line number Diff line number Diff line change @@ -1057,6 +1057,10 @@ def is_monotonic(self) -> bool:
1057
1057
"""
1058
1058
Return boolean if values in the object are monotonically increasing.
1059
1059
1060
+ .. deprecated:: 1.5.0
1061
+ is_monotonic is deprecated and will be removed in a future version.
1062
+ Use is_monotonic_increasing instead.
1063
+
1060
1064
Returns
1061
1065
-------
1062
1066
bool
Original file line number Diff line number Diff line change @@ -1324,7 +1324,35 @@ def items(self) -> Iterable[tuple[Hashable, Series]]:
1324
1324
for i , k in enumerate (self .columns ):
1325
1325
yield k , self ._ixs (i , axis = 1 )
1326
1326
1327
- @Appender (_shared_docs ["items" ])
1327
+ _shared_docs [
1328
+ "iteritems"
1329
+ ] = r"""
1330
+ Iterate over (column name, Series) pairs.
1331
+
1332
+ .. deprecated:: 1.5.0
1333
+ iteritems is deprecated and will be removed in a future version.
1334
+ Use .items instead.
1335
+
1336
+ Iterates over the DataFrame columns, returning a tuple with
1337
+ the column name and the content as a Series.
1338
+
1339
+ Yields
1340
+ ------
1341
+ label : object
1342
+ The column names for the DataFrame being iterated over.
1343
+ content : Series
1344
+ The column entries belonging to each label, as a Series.
1345
+
1346
+ See Also
1347
+ --------
1348
+ DataFrame.iter : Recommended alternative.
1349
+ DataFrame.iterrows : Iterate over DataFrame rows as
1350
+ (index, Series) pairs.
1351
+ DataFrame.itertuples : Iterate over DataFrame rows as namedtuples
1352
+ of the values.
1353
+ """
1354
+
1355
+ @Appender (_shared_docs ["iteritems" ])
1328
1356
def iteritems (self ) -> Iterable [tuple [Hashable , Series ]]:
1329
1357
warnings .warn (
1330
1358
"iteritems is deprecated and will be removed in a future version. "
Original file line number Diff line number Diff line change @@ -2285,6 +2285,10 @@ def _can_hold_na(self) -> bool:
2285
2285
def is_monotonic (self ) -> bool :
2286
2286
"""
2287
2287
Alias for is_monotonic_increasing.
2288
+
2289
+ .. deprecated:: 1.5.0
2290
+ is_monotonic is deprecated and will be removed in a future version.
2291
+ Use is_monotonic_increasing instead.
2288
2292
"""
2289
2293
warnings .warn (
2290
2294
"is_monotonic is deprecated and will be removed in a future version. "
Original file line number Diff line number Diff line change @@ -1816,8 +1816,29 @@ def items(self) -> Iterable[tuple[Hashable, Any]]:
1816
1816
"""
1817
1817
return zip (iter (self .index ), iter (self ))
1818
1818
1819
- @Appender (items .__doc__ )
1820
1819
def iteritems (self ) -> Iterable [tuple [Hashable , Any ]]:
1820
+ """
1821
+ Lazily iterate over (index, value) tuples.
1822
+
1823
+ .. deprecated:: 1.5.0
1824
+ iteritems is deprecated and will be removed in a future version.
1825
+ Use .items instead.
1826
+
1827
+ This method returns an iterable tuple (index, value). This is
1828
+ convenient if you want to create a lazy iterator.
1829
+
1830
+ Returns
1831
+ -------
1832
+ iterable
1833
+ Iterable of tuples containing the (index, value) pairs from a
1834
+ Series.
1835
+
1836
+ See Also
1837
+ --------
1838
+ Series.items : Recommended alternative.
1839
+ DataFrame.items : Iterate over (column name, Series) pairs.
1840
+ DataFrame.iterrows : Iterate over DataFrame rows as (index, Series) pairs.
1841
+ """
1821
1842
warnings .warn (
1822
1843
"iteritems is deprecated and will be removed in a future version. "
1823
1844
"Use .items instead." ,
You can’t perform that action at this time.
0 commit comments