0

I would like to include a table in an xml file. For this, I need to convert the panda's data frame into a string.

I tried applying the following code

string = df.to_string

but when I tried, I am getting the following error:

"TypeError: cannot serialize <bound method DataFrame.to_string of"

any help greatly appreciated.

Emilia
  • 21
  • 3

1 Answers1

0

As Paul and Justin mentioned in the comments, you're just missing a parentheses.

df.to_string()

should do the trick.

Calvin K
  • 104
  • 2
  • 9