I have a Pandas data frame like this one
String = ["".join(np.random.choice(list("PQRSTUVXYZ"), size=7)) for _ in range(7)]
Position = np.random.randint(2,7, size = 7)
df=pd.DataFrame((String,Position)).T
I would like to apply the lower() function JUST in the letter which the index is column Position.
I've tried:
df = df[0][df[1]].str.lower()
But it is lowering the whole string.
Thanks for your help!