qdrant-flask / show_csv.py
aymanemalih's picture
Upload 6 files
bac8f2c
raw
history blame contribute delete
No virus
507 Bytes
import pandas as pd
import csv
def display_csv(csv_file_path):
# CSV processing
with open(csv_file_path, newline='', encoding='utf-8') as csvfile:
reader = csv.DictReader(csvfile)
rows = list(reader)
# Display the entire CSV using pandas
df = pd.DataFrame(rows)
print("Entire CSV File:")
print(df['texte'].head(10))
if __name__ == "__main__":
# Replace 'LIR.csv' with the correct path to your CSV file
csv_file_path = "LIR.csv"
display_csv("LIR.csv")