From/to pandas
Blob
Building a Terality DataFrame from a pandas DataFrame
If you have a pandas
DataFrame or Series, you can import it into Terality with the from_pandas
method. You can also convert to Terality DataFrame to a pandas
DataFrame with to_pandas
.
This is useful when you want to import data with a format not yet supported by Terality: read it with pandas first, then call from_pandas
.
Loading a pandas DataFrame in memory with for example pd.read_parquet
and then using te.Dataframe.from_pandas
is less performant than directly reading the file with Terality with for examplete.read_parquet
. Prefer reading directly from a file when possible.
Retrieving a Terality data structure as a pandas data structure in memory
If you want to continue working on your data in Python, for example doing Machine Learning, you can export back the Terality DataFrame to a pandas DataFrame locally and start using your favorite ML framework.
For this option, you must ensure that the DataFrame is small enough to fit in memory. You're leaving the world of Terality's unlimited memory!
Last updated