creating the data frame

+1 vote

I am trying to convert a tuple in dataframe but this is showing me an error.

ValueError: DataFrame constructor not properly called!

Codes are:

dfPercentage=(round((customer.isna().mean())*100),2)
df = pd.DataFrame(data=dfPercentage, columns =['Columns', 'Count']) 

can some one help, what is the error.

Nov 26, 2019 by deepankar
• 130 points
59 views
Can you please share your dataset in the tuple format? Your syntax seems fine, the issue might be with dataset.

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions

0 votes
1 answer
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 778 views
0 votes
0 answers
0 votes
1 answer

Applying the same function to every row of a data.frame - R

You can use the 'appply()' function for ...READ MORE

answered May 22, 2018 in Data Analytics by Bharani
• 4,560 points
229 views
0 votes
9 answers

Creating an empty data.frame with only column names - R

Will the below code work to create ...READ MORE

answered Aug 1, 2019 in Data Analytics by preeti
35,819 views
0 votes
1 answer

Finding the nth highest value in a vector or a data-frame column

sort(x,T)[n] Here, 'x' is the data-frame/vector and 'n' ...READ MORE

answered May 31, 2018 in Data Analytics by Bharani
• 4,560 points
1,717 views
0 votes
2 answers

How to change the value of a variable using R programming in a data frame?

You are getting this error since the ...READ MORE

answered Aug 16, 2019 in Data Analytics by anonymous
• 32,440 points
3,727 views
0 votes
1 answer

Creating data scraping workflow which saves the data into csv file by sort.

Hi @Pratibha, try using following method to ...READ MORE

answered Oct 24, 2019 in RPA by Anvi
• 14,010 points
78 views
0 votes
1 answer