Script Python permettant de nettoyer et préparer nos données csv.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
395 B

2 years ago
  1. import panda as pd
  2. import numpy as np
  3. import csv
  4. import re
  5. #Afficher les tableaux de données
  6. datafram = pd.read_csv(r"C:\Users\luigg\Data_cleaning\Table_final.csv")
  7. datafram.head(5)
  8. #Supprimer les doublons dans excel
  9. nouvelle_table = datafram.drop_duplicates(
  10. subset = ['order_id', 'customer_id'],
  11. keep = 'last').reset_index(drop = True)
  12. #Afficher la nouvelle table
  13. print(nouvelle_table)