Detail: Bus: Exporter
- Bus.to_series()[source]
Return a
Series
with theFrame
contained in thisBus
. If theBus
is associated with aStore
, allFrame
will be loaded into memory and the returnedBus
will no longer be associated with theStore
.>>> b = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i') >>> b <Bus: i> <Index> x Frame y Frame <<U1> <object> >>> b.to_series() <Series: i> <Index> x Frame y Frame <<U1> <object>
- Bus.to_sqlite(fp, *, config=None)
Write the complete
Bus
as an SQLite database file.- Parameters:
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
compression – Provide a zip compression setting using values from the Python
zipfile
module;zipfile.ZIP_DEFLATED
is standard zlib compression;zipfile.ZIP_STORED
disables compression and may give better performance at the cost of larger file sizes.
>>> b = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i') >>> b <Bus: i> <Index> x Frame y Frame <<U1> <object> >>> b.to_sqlite('/tmp/b.sqlite')
- Bus.to_visidata()
Open an interactive VisiData session.
- Bus.to_xlsx(fp, *, config=None)
Write the complete
Bus
as a XLSX workbook.- Parameters:
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
compression – Provide a zip compression setting using values from the Python
zipfile
module;zipfile.ZIP_DEFLATED
is standard zlib compression;zipfile.ZIP_STORED
disables compression and may give better performance at the cost of larger file sizes.
>>> b = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i') >>> b <Bus: i> <Index> x Frame y Frame <<U1> <object> >>> b.to_xlsx('/tmp/b.xlsx')
- Bus.to_zip_csv(fp, *, config=None, compression=8)
Write the complete
Bus
as a zipped archive of CSV files.- Parameters:
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
compression – Provide a zip compression setting using values from the Python
zipfile
module;zipfile.ZIP_DEFLATED
is standard zlib compression;zipfile.ZIP_STORED
disables compression and may give better performance at the cost of larger file sizes.
>>> b = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i') >>> b <Bus: i> <Index> x Frame y Frame <<U1> <object> >>> b.to_zip_csv('/tmp/b.zip')
- Bus.to_zip_npy(fp, *, config=None, compression=8)
Write the complete
Bus
as a zipped archive of NPY files.- Parameters:
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
compression – Provide a zip compression setting using values from the Python
zipfile
module;zipfile.ZIP_DEFLATED
is standard zlib compression;zipfile.ZIP_STORED
disables compression and may give better performance at the cost of larger file sizes.
>>> b = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i') >>> b <Bus: i> <Index> x Frame y Frame <<U1> <object> >>> b.to_zip_npy('/tmp/b.zip')
- Bus.to_zip_npz(fp, *, config=None, compression=8)
Write the complete
Bus
as a zipped archive of NPZ files.- Parameters:
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
compression – Provide a zip compression setting using values from the Python
zipfile
module;zipfile.ZIP_DEFLATED
is standard zlib compression;zipfile.ZIP_STORED
disables compression and may give better performance at the cost of larger file sizes.
>>> b = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i') >>> b <Bus: i> <Index> x Frame y Frame <<U1> <object> >>> b.to_zip_npz('/tmp/b.zip')
- Bus.to_zip_parquet(fp, *, config=None, compression=8)
Write the complete
Bus
as a zipped archive of parquet files.- Parameters:
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
compression – Provide a zip compression setting using values from the Python
zipfile
module;zipfile.ZIP_DEFLATED
is standard zlib compression;zipfile.ZIP_STORED
disables compression and may give better performance at the cost of larger file sizes.
>>> b = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i') >>> b <Bus: i> <Index> x Frame y Frame <<U1> <object> >>> b.to_zip_parquet('/tmp/b.zip')
- Bus.to_zip_pickle(fp, *, config=None, compression=8)
Write the complete
Bus
as a zipped archive of pickles.- Parameters:
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
compression – Provide a zip compression setting using values from the Python
zipfile
module;zipfile.ZIP_DEFLATED
is standard zlib compression;zipfile.ZIP_STORED
disables compression and may give better performance at the cost of larger file sizes.
>>> b = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i') >>> b <Bus: i> <Index> x Frame y Frame <<U1> <object> >>> b.to_zip_pickle('/tmp/b.zip')
- Bus.to_zip_tsv(fp, *, config=None, compression=8)
Write the complete
Bus
as a zipped archive of TSV files.- Parameters:
fp – A string file path or
Path
instance.config – A
StoreConfig
, or a mapping of label otStoreConfig
compression – Provide a zip compression setting using values from the Python
zipfile
module;zipfile.ZIP_DEFLATED
is standard zlib compression;zipfile.ZIP_STORED
disables compression and may give better performance at the cost of larger file sizes.
>>> b = sf.Bus.from_frames((sf.Frame(np.arange(6).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='x'), sf.Frame((np.arange(6).reshape(3,2) % 2).astype(bool), index=('p', 'q', 'r'), columns=('c', 'd'), name='y')), name='i') >>> b <Bus: i> <Index> x Frame y Frame <<U1> <object> >>> b.to_zip_tsv('/tmp/b.zip')
Bus: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Accessor Hashlib | Accessor Type Clinic