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

Published: 11 March 2024
on channel: 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


On this page of the site you can watch the video online Python – Update a Pandas Dataframe Cell Based on Column and Row with a duration of hours minute second in good quality, which was uploaded by the user sql and py 11 March 2024, share the link with friends and acquaintances, this video has already been watched 10 times on youtube and it was liked by 0 viewers. Enjoy your viewing!