Series.
to_string
Render a string representation of the Series.
Note
This method should only be used if the resulting pandas object is expected to be small, as all the data is loaded into the driver’s memory. If the input is large, set max_rows parameter.
buffer to write to
string representation of NAN to use, default ‘NaN’
formatter function to apply to columns’ elements if they are floats default None
Add the Series header (index name)
Add index (row) labels, default True
Add the Series length
Add the Series dtype
Add the Series name if not None
Maximum number of rows to show before truncating. If None, show all.
Examples
>>> df = ps.DataFrame([(.2, .3), (.0, .6), (.6, .0), (.2, .1)], columns=['dogs', 'cats']) >>> print(df['dogs'].to_string()) 0 0.2 1 0.0 2 0.6 3 0.2
>>> print(df['dogs'].to_string(max_rows=2)) 0 0.2 1 0.0