Python Pandas: ValueError: DataFrame constructor not properly called!

Python

I am trying to create a Python Pandas Dataframe using this code:.

df1=pd.DataFrame('Email')

But I am getting this error:

ValueError: DataFrame constructor not properly called!

 

1
Answers

Replies

The syntax represented above is incorrect. Below is the correct syntax that has to be used.



Df1=pd.DataFrame(columns=[‘Email’])

 
 

If you want to unleash your potential in this competitive field, please visit the Python course page for more information, where you can find the Python tutorials and Python frequently asked interview questions and answers as well.

 

This topic has been locked/unapproved. No replies allowed

Login to participate in this discussion.

Leave a reply

Before proceeding, please check your email for a verification link. If you did not receive the email, click here to request another.