Force KNIME to Read CSV Columns As Strings

@ricardo_martins , @mwiegand another approach could be to use the bundled Python version and tell pandas to import all columns as strings:

import knime.scripting.io as knio
import pandas as pd
import pyarrow.parquet as pq

# ASCII 164 as a delimiter: ¤
df = pd.read_csv(var_csv_file, dtype=str, sep = '¤', engine='python')
df.to_parquet(var_parquet_file, compression='gzip')

I use the way via the parquet file from Python since the import directly into a KNIME table seems to have some problems.

1 Like