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:

df = pd.DataFrame(data=dfPercentage, columns =['Columns', 'Count']) 

can some one help, what is the error.

Nov 27, 2019 by deepankar
• 130 points
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
2 answers
+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 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,473 views
0 votes
1 answer
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,620 points
+4 votes
11 answers

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

Hi, You need to create a data frame ...READ MORE

answered Dec 11, 2020 in Data Analytics by MD
• 95,320 points
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,620 points
+1 vote
3 answers

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

Try this: df$symbol <- as.character(df$symbol) df$symbol[df$sym ...READ MORE

answered Jan 11, 2019 in Data Analytics by Tyrion anex
• 8,690 points
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,150 points
0 votes
1 answer

i write this python to read dataset into panda data frame but im getting NameError: name 'true' is not defined. Below is the code:

change  def parse(path):   g = gz ...READ MORE

answered Mar 15, 2020 in Python by Abhishek Shingadiya