# problem reading .csv file

**URL:** <https://forum.knime.com/t/problem-reading-csv-file/75783>\
**Category:** KNIME Analytics Platform\
**Tags:** python\
**Created:** [December 5, 2023, 4:37pm UTC](https://forum.knime.com/t/problem-reading-csv-file/75783 "2023-12-05T16:37:05Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [December 5, 2023, 9:39pm UTC](https://forum.knime.com/t/problem-reading-csv-file/75783/3 "2023-12-05T21:39:32Z")

</div>

@Mary_lea your Python node has a data port configured but you do not provide one:

> [@Help to use Python do insert variable in SQL code](https://forum.knime.com/t/help-to-use-python-do-insert-variable-in-sql-code/63058/2):
>
> @Aldemir you can export data from within the Python node as Flow Variables or as a dataframe (from a pandas dataframe). The code would look something like this: import knime.scripting.io as knio import numpy as np import pandas as pd # bring your string to a Flow Variable knio.flow\_variables['var\_txt\_cbi'] = txt\_cbi # bring your content to a pandas data frame output\_table = pd.DataFrame({'column\_txt\_cbi': [txt\_cbi]}) # bring the dataframe back to KNIME knio.output\_tables[0] = knio.Table.f…

> [@Python scripting node data input](https://forum.knime.com/t/python-scripting-node-data-input/63962/2):
>
> @Bob_Nisbet the in and out syntax would look like this for pandas dataframes. import knime.scripting.io as knio import numpy as np import pandas as pd # data from KNIME to Python (pandas) df = knio.input\_tables[0].to\_pandas() # data from python (pandas) to KNIME knio.output\_tables[0] = knio.Table.from\_pandas(df) KNIME would work internally with Arrow format [https://docs.knime.com/latest/python\_installation\_guide/index.html#usage-examples](https://docs.knime.com/latest/python_installation_guide/index.html#usage-examples)

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/d/4/d49760fc99d7b599e7896ea932a104b48b786857.png)

> **[Import CSV File - KNIME Forum (75783) – mlauber71](https://hub.knime.com/mlauber71/spaces/Forum/2023/Import%20CSV%20File%20-%20KNIME%20Forum%20(75783)~xzPJcMg-zGfZXj09/current-state)**
>
> Import CSV file and change column headers based on one Row - KNIME Forum (75783) https://forum.knime.com/t/problem-reading-csv-file/75783/3?u=mlauber71

[Import CSV File - KNIME Forum (75783).knwf](https://forum.knime.com/uploads/short-url/2zDEIdnnvy9MAJiqmpzmci9eQPF.knwf) (124.5 KB)

---

_[View the full topic](https://forum.knime.com/t/problem-reading-csv-file/75783)._
