The right side of the assignment has a trailing comma, the line is equivalent to this: dataSubset = (dataSubset], )īasically, the line is trying to perform the following assignment: pandas.Series <- Tuple # tuple with length 1 "6.1.4 JavaScript and Graphics Quiz"]].mean(axis=1)įinalData = pd.concat(,įinalData.to_excel('output/gradesOut.xlsx')īased on this line: dataSubset = dataSubset], "5.1.4 Your Name and Hobby"]].mean(axis=1)ĭataSubset = dataSubset[["5.2.2 Variables Quiz",ĭataSubset = dataSubset[["5.3.2 User Input Quiz",ĭataSubset = dataSubset[["5.4.2 Basic Math in JavaScript Quiz",ĭataSubset = dataSubset[["5.5.2 JavaScript Graphics Quiz",ĭataSubset = dataSubset[["5.6.2 Using RGB to Create Colors", # "2.17.6 Debugging with Error Messages", ]]ĭataSubset = dataSubset]ĭataSubset = dataSubset[["5.1.2 Hello World Quiz", # dataSubset = dataSubset[["2.17.2 Debugging Basics", # dataSubset = dataSubset[["2.16.2 How to Indent Your Code Quiz", # dataSubset = dataSubset[["2.14.2 Control Structures Example Quiz", # If any of these dataframes are uncommented, the code blows up. "2.14.2 Control Structures Example Quiz", What am I doing wrong? It works as long as I don't concatenate more than it wants. This code runs perfectly however, if I uncomment any additional columns, the code blows up and gives the aformentioned error. I then create 'finalData' which represents the pd.concat function concatenating all of the calculated mean columns together. I use 'dataSubset' to create several 'mean' columns representing the mean of multiple columns respectively. I've created 'dataSubset' to represent the filtered data. I then filter the data using Pandas' filter method. I'm reading in data from an Excel spreadsheet using Pandas' 'pd.read_excel method. I'm getting 'ValueError: Length of values does not match length of index' while using Pandas.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |