Assume a dataframe df -
df = pd.DataFrame(['a'])
I want to extract the string 'a' from this dataframe. I tried to extract it by trying the following from stackoverflow answers - Attempt 1 -
print(df.iloc[0])
>>0    a
Name: 0, dtype: object
Attempt 2 -
print(df.astype(str))
>>  0
0  a
Please help me extract the string 'a' from the dataframe
 
    