52
pandas: powerful Python data analysis toolkit, Release 0.18.1
xrot: float,default None
rotation of xaxis labels
ylabelsize : int, default None
If specified changes the y-axis label size
yrot: float,default None
rotation of yaxis labels
figsize : tuple, default None
figure size in inches by default
bins: integer, default 10
Numberof histogrambins to be used
kwds : keywords
Tobe passed to the actual plotting function
Notes
See matplotlib documentation online formore onthis
35.3.17 Serialization / IO / Conversion
Series.from_csv(path[,sep,parse_dates,...])
Read CSV file (DISCOURAGED,please usepandas.read_csv() instead).
Series.to_pickle(path)
Pickle (serialize)object to input file path.
Series.to_csv(path[,index,sep,na_rep,...])
Write Series toa comma-separated values (csv) file
Series.to_dict()
Convert Series to {label -> value} dict
Series.to_frame([name])
Convert Series to DataFrame
Series.to_xarray()
Return an xarray object from the pandas object.
Series.to_hdf(path_or_buf,key,**kwargs)
Activate the HDFStore.
Series.to_sql(name,con[,flavor,schema,...]) WriterecordsstoredinaDataFrametoaSQLdatabase.
Series.to_msgpack([path_or_buf,encoding]) msgpack(serialize)objecttoinputfilepath
Series.to_json([path_or_buf,orient,...])
Convert the object to a JSON string.
Series.to_sparse([kind,fill_value])
Convert Series to SparseSeries
Series.to_dense()
Return dense representation ofNDFrame (as opposed to sparse)
Series.to_string([buf,na_rep,...])
Render a string representation of the Series
Series.to_clipboard([excel,sep])
Attempt to write text representation of object to the system clipboard This can be pasted into Excel, for example.
pandas.Series.from_csv
classmethod Series.from_csv(path, sep=’, ‘, parse_dates=True, header=None, index_col=0, encod-
ing=None, infer_datetime_format=False)
Read CSV file (DISCOURAGED, please usepandas.read_csv() instead).
It is preferable to use the more powerfulpandas.read_csv() for most general purposes, but from_csv
makes for an easy roundtrip toand from a file (the exact counterpart of to_csv),especially witha time Series.
This method only differs frompandas.read_csv() in some defaults:
•index_col is 0 instead of None (take first column as index by default)
35.3. Series
1267