Home > front end >  Create string variable from value in dataframe field pandas
Create string variable from value in dataframe field pandas

Time:08-24

A query that I have not managed to find and I've been trying for a while, how can I pass the value of a dataframe to a string variable without inheriting that is of type object? This is because I need to concatenate in a text certain values of a dataframe.

Let me explain:

v_addres = df_example['Addres']
print("Addres is "   v_addres)

The result is approximate, but it adds values for me.

"0    Addres is .... Name: Addres, dtype: object"

How can I keep only the value of the field?

I want see some this:

"Addres is Av. Springfield 178."

Thank you very much.

Best regards

CodePudding user response:

try this if you make the example reproducible, i'll be able to share the resut

df_example['Addres'][0]
  • Related