21 lines
549 B
Python
21 lines
549 B
Python
import csv
|
|
|
|
import pandas as pdf
|
|
|
|
|
|
def csv_to_list(path: str) -> list[str]:
|
|
"""
|
|
Extracts the data from a csv file and returns it as a pandas dataframe
|
|
"""
|
|
with open(path, newline='') as csvfile:
|
|
reader = csv.reader(csvfile, delimiter=';', quotechar='|')
|
|
ret = []
|
|
for row in reader:
|
|
print(row)
|
|
ret.append(row[0].replace('"', ""))
|
|
return ret
|
|
|
|
if __name__ == "__main__":
|
|
text = csv_to_list("C:/Users/aky547/Desktop/semap/71.csv")
|
|
#remove linebreaks
|
|
print(text) |