I am trying to set a value in panda dataframe.
ZEROS = np.zeros((4,4), dtype=np.int)
df = pd.DataFrame(ZEROS, columns=['A1','B1','C1','D1'])
df.at[2,3] = 32
df
I don't want NaN
for the entire column, the expected output is below:
Using numpy I am able to set the value like below
ZEROS[1][3] = 44
output:
array([[ 0, 0, 0, 0],
[ 0, 0, 0, 44],
[ 0, 0, 0, 0],
[ 0, 0, 0, 0]])