I'm trying to add new values from a previous df into a newly created df.
new_df = pd.DataFrame(columns=['org1_name','org1_desc','org2_name','org2_desc','score'])
new_df.iloc[0,0] = previous_df.name[0]
previous_df.name[0]
gives me
9958 SETA BioMedicals
Name: name, dtype: object
and I just want "SETA BioMedicals".
However, previous_df.name[0]
keeps giving me a pandas.core.series.Series instead of a string, and when I add to_string
to it, it just changes the type to a method instead of a string. Any help would be appreciated!