Spaces:
Runtime error
Runtime error
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") | |