Hi. I am trying to print a pandas dataframe without the index. When I want to print the whole dataframe without index, I use the below code:
print (filedata.tostring(index=False))
But now I want to print only one column without index. To print only one column I am using this:
print (filedata[‘name’])
I tried to use this code to print it without index:
print ((df.to_string(['Email']), index=False))
But I got this error:
print ((df.to_string(['Email']), index=False))
^
SyntaxError: invalid syntax
How to do this?