@@ -1518,6 +1518,11 @@ def bool(self):
1518
1518
This must be a boolean scalar value, either True or False. Raise a
1519
1519
ValueError if the PandasObject does not have exactly 1 element, or that
1520
1520
element is not boolean
1521
+
1522
+ Returns
1523
+ -------
1524
+ boolean
1525
+ Same single boolean value converted to bool type.
1521
1526
"""
1522
1527
v = self .squeeze ()
1523
1528
if isinstance (v , (bool , np .bool_ )):
@@ -1845,7 +1850,13 @@ def __hash__(self):
1845
1850
' hashed' .format (self .__class__ .__name__ ))
1846
1851
1847
1852
def __iter__ (self ):
1848
- """Iterate over info axis"""
1853
+ """Iterate over info axis
1854
+
1855
+ Returns
1856
+ -------
1857
+ iterator
1858
+ Info axis as iterator.
1859
+ """
1849
1860
return iter (self ._info_axis )
1850
1861
1851
1862
# can we get a better explanation of this?
@@ -1854,6 +1865,11 @@ def keys(self):
1854
1865
1855
1866
This is index for Series, columns for DataFrame and major_axis for
1856
1867
Panel.
1868
+
1869
+ Returns
1870
+ -------
1871
+ Index
1872
+ Info axis.
1857
1873
"""
1858
1874
return self ._info_axis
1859
1875
@@ -1948,6 +1964,11 @@ def __array_wrap__(self, result, context=None):
1948
1964
def to_dense (self ):
1949
1965
"""
1950
1966
Return dense representation of NDFrame (as opposed to sparse).
1967
+
1968
+ Returns
1969
+ -------
1970
+ self: %(klass)s
1971
+ Dense %(klass)s.
1951
1972
"""
1952
1973
# compat
1953
1974
return self
@@ -2240,6 +2261,12 @@ def to_json(self, path_or_buf=None, orient=None, date_format=None,
2240
2261
2241
2262
.. versionadded:: 0.23.0
2242
2263
2264
+ Returns
2265
+ -------
2266
+ None or str
2267
+ If path_or_buf is None, returns the resulting json format as a
2268
+ string. Otherwise returns None.
2269
+
2243
2270
See Also
2244
2271
--------
2245
2272
read_json
@@ -2364,6 +2391,10 @@ def to_hdf(self, path_or_buf, key, **kwargs):
2364
2391
See the errors argument for :func:`open` for a full list
2365
2392
of options.
2366
2393
2394
+ Returns
2395
+ -------
2396
+ None
2397
+
2367
2398
See Also
2368
2399
--------
2369
2400
DataFrame.read_hdf : Read from HDF file.
@@ -2420,6 +2451,12 @@ def to_msgpack(self, path_or_buf=None, encoding='utf-8', **kwargs):
2420
2451
(default is False)
2421
2452
compress : type of compressor (zlib or blosc), default to None (no
2422
2453
compression)
2454
+
2455
+ Returns
2456
+ -------
2457
+ None or str
2458
+ If path_or_buf is None, returns the resulting msgpack format as a
2459
+ string. Otherwise returns None.
2423
2460
"""
2424
2461
2425
2462
from pandas .io import packers
@@ -2583,6 +2620,10 @@ def to_pickle(self, path, compression='infer',
2583
2620
.. [1] https://docs.python.org/3/library/pickle.html
2584
2621
.. versionadded:: 0.21.0
2585
2622
2623
+ Returns
2624
+ -------
2625
+ None
2626
+
2586
2627
See Also
2587
2628
--------
2588
2629
read_pickle : Load pickled pandas object (or any object) from file.
@@ -6171,13 +6212,23 @@ def fillna(self, value=None, method=None, axis=None, inplace=False,
6171
6212
def ffill (self , axis = None , inplace = False , limit = None , downcast = None ):
6172
6213
"""
6173
6214
Synonym for :meth:`DataFrame.fillna` with ``method='ffill'``.
6215
+
6216
+ Returns
6217
+ -------
6218
+ %(klass)s
6219
+ Object with missing values filled.
6174
6220
"""
6175
6221
return self .fillna (method = 'ffill' , axis = axis , inplace = inplace ,
6176
6222
limit = limit , downcast = downcast )
6177
6223
6178
6224
def bfill (self , axis = None , inplace = False , limit = None , downcast = None ):
6179
6225
"""
6180
6226
Synonym for :meth:`DataFrame.fillna` with ``method='bfill'``.
6227
+
6228
+ Returns
6229
+ -------
6230
+ %(klass)s
6231
+ Object with missing values filled.
6181
6232
"""
6182
6233
return self .fillna (method = 'bfill' , axis = axis , inplace = inplace ,
6183
6234
limit = limit , downcast = downcast )
@@ -9270,6 +9321,8 @@ def tz_convert(self, tz, axis=0, level=None, copy=True):
9270
9321
9271
9322
Returns
9272
9323
-------
9324
+ %(klass)s
9325
+ %(klass)s with time zone converted axis.
9273
9326
9274
9327
Raises
9275
9328
------
0 commit comments