<jupyter_start><jupyter_text>Example - Data processingThe dataset we use here is provided by "Landesamt für Landwirtschaft, Umwelt und ländliche Räume (LLUR)" and contains data of wind turbines. https://www.govdata.de/web/guest/daten/-/details/windkraftanlagen-betriebene-wka-pro-jahr-in-schleswig-holstein  Read in the CSV fileTo read in the csv file we can use the open() function from python<jupyter_code>wind_file = []

with open("opendata_wka_inbetrieb_sh_20210217.csv",'r') as f:
    wind_file = f.readlines()
wind_file<jupyter_output><empty_output><jupyter_text>ok... we got the data but how to continue?- remove all the \n<jupyter_code>wind_file_new = []
for line in wind_file:
    wind_file_new.append(line.strip())
wind_file_new<jupyter_output><empty_output><jupyter_text>Now we need to separate the items<jupyter_code>wind_file_new_new = []
for i in wind_file_new:
    wind_file_new_new.append(i.split(";"))
wind_file_new_new<jupyter_output><empty_output><jupyter_text>ok we did it.... but is there a way to make it easier?see [DataFrame](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html)  Using Pandas - we use the module pandas- we just import pandas<jupyter_code>import pandas as pd
df = pd.read_csv("opendata_wka_inbetrieb_sh_20210217.csv")
display (df)<jupyter_output><empty_output><jupyter_text>this does not look so nice and not everything is in line ok not the right seperator... we need a ; instread of a ,<jupyter_code>df = pd.read_csv("opendata_wka_inbetrieb_sh_20210217.csv",sep=";")
display(df)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10569620253164556, 'fraction_numerical': 0.015189873417721518, 'mean_word_length': 6.219178082191781, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '133833', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 598, 'n_tokens_neox': 579, 'n_words': 136, 'path': 'lecture/data_processing_readin_csv.ipynb', 'repo_name': 'G0RELLA/gorella_mwn', 'size': '1580'}