Charger des données depuis file.csv / file.xlsx / file.txt

Category:

#*******************************

import pandas as pd

dataset1 = pd.read_csv(r"C:\Users\salon\Downloads\googleplaystore.csv\googleplaystore.csv")

from pandas import ExcelWriter
from pandas import ExcelFile
 
dataset2 = pd.read_excel(r"C:\Users\salon\Documents\googleplaystore.xlsx")

Pour charger les données sans donner un nom au colonnes:
titi =  pd.read_csv(r"C:\Users\salon\Downloads\test.csv",header=None)


titi2 =   pd.read_csv("C:\\Users\\salon\\Desktop\\AI\\chap3\\machine-learning-ex2\\machine-learning-ex2\\ex2\\ex2data1.txt", sep ="\t",header=None)
60.45788573918959,73.09499809758037,1
58.84095621726802,75.85844831279042,1
new = titi2 [0].str.split(",", n = 2, expand = True)
#*******************************