Panel.to_xarray()

Panel.to_xarray() [source] Return an xarray object from the pandas object. Returns: a DataArray for a Series a Dataset for a DataFrame a DataArray for higher dims Notes See the xarray docs Examples >>> df = pd.DataFrame({'A' : [1, 1, 2], 'B' : ['foo', 'bar', 'foo'], 'C' : np.arange(4.,7)}) >>> df A B C 0 1 foo 4.0 1 1 bar 5.0 2 2 foo 6.0 >>> df.to_xarray() <xarray.Dataset> Dimensions: (index

Panel.to_sql()

Panel.to_sql(name, con, flavor=None, schema=None, if_exists='fail', index=True, index_label=None, chunksize=None, dtype=None) [source] Write records stored in a DataFrame to a SQL database. Parameters: name : string Name of SQL table con : SQLAlchemy engine or DBAPI2 connection (legacy mode) Using SQLAlchemy makes it possible to use any DB supported by that library. If a DBAPI2 object, only sqlite3 is supported. flavor : ?sqlite?, default None DEPRECATED: this parameter will be remove

Panel.to_sparse()

Panel.to_sparse(*args, **kwargs) [source] NOT IMPLEMENTED: do not call this method, as sparsifying is not supported for Panel objects and will raise an error. Convert to SparsePanel

Panel.to_pickle()

Panel.to_pickle(path) [source] Pickle (serialize) object to input file path. Parameters: path : string File path

Panel.to_msgpack()

Panel.to_msgpack(path_or_buf=None, encoding='utf-8', **kwargs) [source] msgpack (serialize) object to input file path THIS IS AN EXPERIMENTAL LIBRARY and the storage format may not be stable until a future release. Parameters: path : string File path, buffer-like, or None if None, return generated string append : boolean whether to append to an existing msgpack (default is False) compress : type of compressor (zlib or blosc), default to None (no compression)

Panel.to_long()

Panel.to_long(*args, **kwargs) [source]

Panel.to_json()

Panel.to_json(path_or_buf=None, orient=None, date_format='epoch', double_precision=10, force_ascii=True, date_unit='ms', default_handler=None, lines=False) [source] Convert the object to a JSON string. Note NaN?s and None will be converted to null and datetime objects will be converted to UNIX timestamps. Parameters: path_or_buf : the path or buffer to write the result string if this is None, return a StringIO of the converted string orient : string Seriesdefault is ?index? allowed valu

Panel.to_hdf()

Panel.to_hdf(path_or_buf, key, **kwargs) [source] Write the contained data to an HDF5 file using HDFStore. Parameters: path_or_buf : the path (string) or HDFStore object key : string indentifier for the group in the store mode : optional, {?a?, ?w?, ?r+?}, default ?a? 'w' Write; a new file is created (an existing file with the same name would be deleted). 'a' Append; an existing file is opened for reading and writing, and if the file does not exist it is created. 'r+' It is s

Panel.to_frame()

Panel.to_frame(filter_observations=True) [source] Transform wide format into long (stacked) format as DataFrame whose columns are the Panel?s items and whose index is a MultiIndex formed of the Panel?s major and minor axes. Parameters: filter_observations : boolean, default True Drop (major, minor) pairs without a complete set of observations across all the items Returns: y : DataFrame

Panel.to_excel()

Panel.to_excel(path, na_rep='', engine=None, **kwargs) [source] Write each DataFrame in Panel to a separate excel sheet Parameters: path : string or ExcelWriter object File path or existing ExcelWriter na_rep : string, default ?? Missing data representation engine : string, default None write engine to use - you can also set this via the options io.excel.xlsx.writer, io.excel.xls.writer, and io.excel.xlsm.writer. Other Parameters: float_format : string, default None Format string