Detail: Quilt: Exporter#
- Quilt.to_frame()[source]#
Return a consolidated
Frame.>>> 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(40, 46).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='v')), name='j') >>> q1 = sf.Quilt(b, retain_labels=True) >>> q1 <Quilt: j> <Index: Aligned> a b <<U1> <Index: Frames> x . . v . . <<U1> >>> q1.to_frame() <Frame> <Index> a b <<U1> <IndexHierarchy> x p 0 1 x q 2 3 x r 4 5 v p 40 41 v q 42 43 v r 44 45 <<U1> <<U1> <int64> <int64>
- Quilt.to_sqlite(fp, /, *, config=None)#
Write the complete
Busas an SQLite database file.- Parameters:
fp – A string file path or
Pathinstance.config – A
StoreConfig, or a mapping of label toStoreConfigcompression – Provide a zip compression setting using values from the Python
zipfilemodule;zipfile.ZIP_DEFLATEDis standard zlib compression;zipfile.ZIP_STOREDdisables 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(40, 46).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='v')), name='j') >>> q = sf.Quilt(b, retain_labels=True) >>> q <Quilt: j> <Index: Aligned> a b <<U1> <Index: Frames> x . . v . . <<U1> >>> q.to_sqlite('/tmp/q.db')
- Quilt.to_visidata()#
Open an interactive VisiData session.
- Quilt.to_xlsx(fp, /, *, config=None)#
Write the complete
Busas a XLSX workbook.- Parameters:
fp – A string file path or
Pathinstance.config – A
StoreConfig, or a mapping of label toStoreConfigcompression – Provide a zip compression setting using values from the Python
zipfilemodule;zipfile.ZIP_DEFLATEDis standard zlib compression;zipfile.ZIP_STOREDdisables 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(40, 46).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='v')), name='j') >>> q = sf.Quilt(b, retain_labels=True) >>> q <Quilt: j> <Index: Aligned> a b <<U1> <Index: Frames> x . . v . . <<U1> >>> q.to_xlsx('/tmp/q.xlsx')
- Quilt.to_zip_csv(fp, /, *, config=None, compression=8)#
Write the complete
Busas a zipped archive of CSV files.- Parameters:
fp – A string file path or
Pathinstance.config – A
StoreConfig, or a mapping of label toStoreConfigcompression – Provide a zip compression setting using values from the Python
zipfilemodule;zipfile.ZIP_DEFLATEDis standard zlib compression;zipfile.ZIP_STOREDdisables 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(40, 46).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='v')), name='j') >>> q = sf.Quilt(b, retain_labels=True) >>> q <Quilt: j> <Index: Aligned> a b <<U1> <Index: Frames> x . . v . . <<U1> >>> q.to_zip_csv('/tmp/q.zip')
- Quilt.to_zip_npy(fp, /, *, config=None, compression=8)#
Write the complete
Busas a zipped archive of NPY files.- Parameters:
fp – A string file path or
Pathinstance.config – A
StoreConfig, or a mapping of label toStoreConfigcompression – Provide a zip compression setting using values from the Python
zipfilemodule;zipfile.ZIP_DEFLATEDis standard zlib compression;zipfile.ZIP_STOREDdisables 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(40, 46).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='v')), name='j') >>> q = sf.Quilt(b, retain_labels=True) >>> q <Quilt: j> <Index: Aligned> a b <<U1> <Index: Frames> x . . v . . <<U1> >>> q.to_zip_npy('/tmp/q.zip')
- Quilt.to_zip_npz(fp, /, *, config=None, compression=8)#
Write the complete
Busas a zipped archive of NPZ files.- Parameters:
fp – A string file path or
Pathinstance.config – A
StoreConfig, or a mapping of label toStoreConfigcompression – Provide a zip compression setting using values from the Python
zipfilemodule;zipfile.ZIP_DEFLATEDis standard zlib compression;zipfile.ZIP_STOREDdisables 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(40, 46).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='v')), name='j') >>> q = sf.Quilt(b, retain_labels=True) >>> q <Quilt: j> <Index: Aligned> a b <<U1> <Index: Frames> x . . v . . <<U1> >>> q.to_zip_npz('/tmp/q.zip')
- Quilt.to_zip_parquet(fp, /, *, config=None, compression=8)#
Write the complete
Busas a zipped archive of parquet files.- Parameters:
fp – A string file path or
Pathinstance.config – A
StoreConfig, or a mapping of label toStoreConfigcompression – Provide a zip compression setting using values from the Python
zipfilemodule;zipfile.ZIP_DEFLATEDis standard zlib compression;zipfile.ZIP_STOREDdisables 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(40, 46).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='v')), name='j') >>> q = sf.Quilt(b, retain_labels=True) >>> q <Quilt: j> <Index: Aligned> a b <<U1> <Index: Frames> x . . v . . <<U1> >>> q.to_zip_parquet('/tmp/q.zip')
- Quilt.to_zip_pickle(fp, /, *, config=None, compression=8)#
Write the complete
Busas a zipped archive of pickles.- Parameters:
fp – A string file path or
Pathinstance.config – A
StoreConfig, or a mapping of label toStoreConfigcompression – Provide a zip compression setting using values from the Python
zipfilemodule;zipfile.ZIP_DEFLATEDis standard zlib compression;zipfile.ZIP_STOREDdisables 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(40, 46).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='v')), name='j') >>> q = sf.Quilt(b, retain_labels=True) >>> q <Quilt: j> <Index: Aligned> a b <<U1> <Index: Frames> x . . v . . <<U1> >>> q.to_zip_pickle('/tmp/q.zip')
- Quilt.to_zip_tsv(fp, /, *, config=None, compression=8)#
Write the complete
Busas a zipped archive of TSV files.- Parameters:
fp – A string file path or
Pathinstance.config – A
StoreConfig, or a mapping of label toStoreConfigcompression – Provide a zip compression setting using values from the Python
zipfilemodule;zipfile.ZIP_DEFLATEDis standard zlib compression;zipfile.ZIP_STOREDdisables 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(40, 46).reshape(3,2), index=('p', 'q', 'r'), columns=('a', 'b'), name='v')), name='j') >>> q = sf.Quilt(b, retain_labels=True) >>> q <Quilt: j> <Index: Aligned> a b <<U1> <Index: Frames> x . . v . . <<U1> >>> q.to_zip_tsv('/tmp/q.zip')
Quilt: Constructor | Exporter | Attribute | Method | Dictionary-Like | Display | Selector | Iterator | Accessor Hashlib | Accessor Type Clinic