@@ -1518,6 +1518,11 @@ def bool(self):
15181518 This must be a boolean scalar value, either True or False. Raise a
15191519 ValueError if the PandasObject does not have exactly 1 element, or that
15201520 element is not boolean
1521+
1522+ Returns
1523+ -------
1524+ bool
1525+ Same single boolean value converted to bool type.
15211526 """
15221527 v = self .squeeze ()
15231528 if isinstance (v , (bool , np .bool_ )):
@@ -1845,14 +1850,26 @@ def __hash__(self):
18451850 ' hashed' .format (self .__class__ .__name__ ))
18461851
18471852 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+ """
18491861 return iter (self ._info_axis )
18501862
18511863 # can we get a better explanation of this?
18521864 def keys (self ):
18531865 """Get the 'info axis' (see Indexing for more)
18541866
18551867 This is index for Series, columns for DataFrame.
1868+
1869+ Returns
1870+ -------
1871+ Index
1872+ Info axis.
18561873 """
18571874 return self ._info_axis
18581875
@@ -1946,6 +1963,11 @@ def __array_wrap__(self, result, context=None):
19461963 def to_dense (self ):
19471964 """
19481965 Return dense representation of NDFrame (as opposed to sparse).
1966+
1967+ Returns
1968+ -------
1969+ %(klass)s
1970+ Dense %(klass)s.
19491971 """
19501972 # compat
19511973 return self
@@ -2238,6 +2260,12 @@ def to_json(self, path_or_buf=None, orient=None, date_format=None,
22382260
22392261 .. versionadded:: 0.23.0
22402262
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+
22412269 See Also
22422270 --------
22432271 read_json
@@ -2418,6 +2446,12 @@ def to_msgpack(self, path_or_buf=None, encoding='utf-8', **kwargs):
24182446 (default is False)
24192447 compress : type of compressor (zlib or blosc), default to None (no
24202448 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.
24212455 """
24222456
24232457 from pandas .io import packers
@@ -6167,13 +6201,23 @@ def fillna(self, value=None, method=None, axis=None, inplace=False,
61676201 def ffill (self , axis = None , inplace = False , limit = None , downcast = None ):
61686202 """
61696203 Synonym for :meth:`DataFrame.fillna` with ``method='ffill'``.
6204+
6205+ Returns
6206+ -------
6207+ %(klass)s
6208+ Object with missing values filled.
61706209 """
61716210 return self .fillna (method = 'ffill' , axis = axis , inplace = inplace ,
61726211 limit = limit , downcast = downcast )
61736212
61746213 def bfill (self , axis = None , inplace = False , limit = None , downcast = None ):
61756214 """
61766215 Synonym for :meth:`DataFrame.fillna` with ``method='bfill'``.
6216+
6217+ Returns
6218+ -------
6219+ %(klass)s
6220+ Object with missing values filled.
61776221 """
61786222 return self .fillna (method = 'bfill' , axis = axis , inplace = inplace ,
61796223 limit = limit , downcast = downcast )
@@ -9313,6 +9357,8 @@ def tz_convert(self, tz, axis=0, level=None, copy=True):
93139357
93149358 Returns
93159359 -------
9360+ %(klass)s
9361+ Object with time zone converted axis.
93169362
93179363 Raises
93189364 ------
0 commit comments