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

#%%

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