Skip to content

Commit 3a17c1e

Browse files
committed
DOC: DataFrame.to_string/Series.to_string docstrings, GH #732
1 parent 4f5ae07 commit 3a17c1e

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

RELEASE.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,8 @@ pandas 0.7.0
252252
- Raise Exception in DateRange when offset with n=0 is passed (GH #683)
253253
- Fix get/set inconsistency with .ix property and integer location but
254254
non-integer index (GH #707)
255+
- Use right dropna function for SparseSeries. Return dense Series for NA fill
256+
value (GH #730)
255257

256258
Thanks
257259
------

pandas/core/format.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@
4040
index_names : bool, optional
4141
Prints the names of the indexes, default True
4242
force_unicode : bool, default False
43-
Always return a unicode result"""
43+
Always return a unicode result
44+
45+
Returns
46+
-------
47+
formatted : string (or unicode, depending on data and options)"""
4448

4549
class SeriesFormatter(object):
4650

pandas/core/series.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,28 @@ def _tidy_repr(self, max_vals=20):
595595

596596
def to_string(self, buf=None, na_rep='NaN', float_format=None,
597597
nanRep=None, length=False, name=False):
598+
"""
599+
Render a string representation of the Series
600+
601+
Parameters
602+
----------
603+
buf : StringIO-like, optional
604+
buffer to write to
605+
na_rep : string, optional
606+
string representation of NAN to use, default 'NaN'
607+
float_format : one-parameter function, optional
608+
formatter function to apply to columns' elements if they are floats
609+
default None
610+
length : boolean, default False
611+
Add the Series length
612+
name : boolean, default False
613+
Add the Series name (which may be None)
614+
615+
Returns
616+
-------
617+
formatted : string (if not buffer passed)
618+
"""
619+
598620
if nanRep is not None: # pragma: no cover
599621
import warnings
600622
warnings.warn("nanRep is deprecated, use na_rep",

0 commit comments

Comments
 (0)