@@ -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
+ bool
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,14 +1850,26 @@ def __hash__(self):
1845
1850
' hashed' .format (self .__class__ .__name__ ))
1846
1851
1847
1852
def __iter__ (self ):
1848
- """Iterate over info axis"""
1853
+ """
1854
+ Iterate over info axis.
1855
+
1856
+ Returns
1857
+ -------
1858
+ iterator
1859
+ Info axis as iterator.
1860
+ """
1849
1861
return iter (self ._info_axis )
1850
1862
1851
1863
# can we get a better explanation of this?
1852
1864
def keys (self ):
1853
1865
"""Get the 'info axis' (see Indexing for more)
1854
1866
1855
1867
This is index for Series, columns for DataFrame.
1868
+
1869
+ Returns
1870
+ -------
1871
+ Index
1872
+ Info axis.
1856
1873
"""
1857
1874
return self ._info_axis
1858
1875
@@ -1946,6 +1963,11 @@ def __array_wrap__(self, result, context=None):
1946
1963
def to_dense (self ):
1947
1964
"""
1948
1965
Return dense representation of NDFrame (as opposed to sparse).
1966
+
1967
+ Returns
1968
+ -------
1969
+ %(klass)s
1970
+ Dense %(klass)s.
1949
1971
"""
1950
1972
# compat
1951
1973
return self
@@ -2238,6 +2260,12 @@ def to_json(self, path_or_buf=None, orient=None, date_format=None,
2238
2260
2239
2261
.. versionadded:: 0.23.0
2240
2262
2263
+ Returns
2264
+ -------
2265
+ None or str
2266
+ If path_or_buf is None, returns the resulting json format as a
2267
+ string. Otherwise returns None.
2268
+
2241
2269
See Also
2242
2270
--------
2243
2271
read_json
@@ -2418,6 +2446,12 @@ def to_msgpack(self, path_or_buf=None, encoding='utf-8', **kwargs):
2418
2446
(default is False)
2419
2447
compress : type of compressor (zlib or blosc), default to None (no
2420
2448
compression)
2449
+
2450
+ Returns
2451
+ -------
2452
+ None or str
2453
+ If path_or_buf is None, returns the resulting msgpack format as a
2454
+ string. Otherwise returns None.
2421
2455
"""
2422
2456
2423
2457
from pandas .io import packers
@@ -6167,13 +6201,23 @@ def fillna(self, value=None, method=None, axis=None, inplace=False,
6167
6201
def ffill (self , axis = None , inplace = False , limit = None , downcast = None ):
6168
6202
"""
6169
6203
Synonym for :meth:`DataFrame.fillna` with ``method='ffill'``.
6204
+
6205
+ Returns
6206
+ -------
6207
+ %(klass)s
6208
+ Object with missing values filled.
6170
6209
"""
6171
6210
return self .fillna (method = 'ffill' , axis = axis , inplace = inplace ,
6172
6211
limit = limit , downcast = downcast )
6173
6212
6174
6213
def bfill (self , axis = None , inplace = False , limit = None , downcast = None ):
6175
6214
"""
6176
6215
Synonym for :meth:`DataFrame.fillna` with ``method='bfill'``.
6216
+
6217
+ Returns
6218
+ -------
6219
+ %(klass)s
6220
+ Object with missing values filled.
6177
6221
"""
6178
6222
return self .fillna (method = 'bfill' , axis = axis , inplace = inplace ,
6179
6223
limit = limit , downcast = downcast )
@@ -9313,6 +9357,8 @@ def tz_convert(self, tz, axis=0, level=None, copy=True):
9313
9357
9314
9358
Returns
9315
9359
-------
9360
+ %(klass)s
9361
+ Object with time zone converted axis.
9316
9362
9317
9363
Raises
9318
9364
------
0 commit comments