Toni
09/16/2022, 9:24 AMnp.array
with the catalog
? Is there a way to save this np.array
as CSV "easily"? I cannot use the pandas.CSVDataSet
because it is not a dataframe.
I think that this can be done with trascoding datasets, but I do not know if there is a dataset
for np.arrays
in kedro.Merel
09/16/2022, 9:37 AMnumpy
datasets, but perhaps you can convert your array to something that can be saved in the available datasets? You can find the full list of options here: https://kedro.readthedocs.io/en/stable/kedro.extras.datasets.html#module-kedro.extras.datasetsAntony Milne
09/16/2022, 10:35 AMpandas.DataFrame
wraps np.array
, probably the easiest approach is indeed to just generate a pd.DataFrame
from the array and then use pandas.CSVDataSet
. There’d be a small performance hit associated with doing this compared to doing np.array.savetxt
directly but shouldn’t matter unless you’re dealing with really big arrays.