Python – Update a Pandas Dataframe Cell Based on Column and Row

Publié le: 11 mars 2024
sur la chaîne: sql and py
10
0

#%%

import pandas as pd
df = pd.read_csv('C:\Data\sample_data\california_housing_test.csv')

#%%

df

#%%

df.loc[2999, 'longitude'] = 10

#%%

df.loc[2999, 'longitude'] = -119.63


Sur cette page du site, vous pouvez voir la vidéo en ligne Python – Update a Pandas Dataframe Cell Based on Column and Row durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur sql and py 11 mars 2024, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 10 fois et il a aimé 0 téléspectateurs. Bon visionnage!