Python Pandas: ValueError: DataFrame constructor not properly called!
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!
You are getting this error “Python Pandas: ValueError: DataFrame constructor not properly called” because you are calling the DataFrame constructor with invalid arguments. To create a data frame you need to pass data in a valid format. In your case, you need to pass a dictionary with a key as a string with the value Email and value as a list of strings that represent email addresses. For example.:
email_dataframe = pd.DataFrame({ 'Email': ['abc@xyz.com'] })
print(email_dataframe)