I am trying to store an array to the data frame cell using df.at as below:
import numpy as np
import pandas as pd
arr = np.array([[123, 123], [123, 123]], dtype=int)
df = pd.DataFrame(data= [[1, 2], [3, 4]], columns=["A", "B"])
df.at[0, "A"] = arr
But I keep getting the following error:
ValueError: setting an array element with a sequence.
I tried solving this by following this thread, but unfortunately the solutions did not work for me.
I need to use df.at and not another method, Any help ?