Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Keep getting this Error File C:UsersdavisAppDataLocalProgramsPythonPython36-32libsite-packagespandascoreinternals.py, line 3069, in set_axis (old_len, new_len)) ValueError: Length mismatch: Expected axis has 1 elements, new values have 10 elements

Keep getting this Error

File "C:\Users\davis\AppData\Local\Programs\Python\Python36-32\lib\site-packages\pandas\core\internals.py", line 3069, in set_axis (old_len, new_len)) ValueError: Length mismatch: Expected axis has 1 elements, new values have 10 elements

Code

import pandas as pd import numpy as np

dataset = pd.read_csv("book1.csv")

dataset = pd.read_csv("book1.csv", parse_dates=[0],skiprows = [0.1]) dataset.columns = ["Date", "Score Type", "Visitor Team", "VisitorPts", "Home Team", "","Score","OT?","","Notes"]

dataset.ix[:5]

image text in transcribed

A1 | Date 1 Date Start (ET) Visitor/NEPTS 2 Tue Oct1 8:01 PM Boston Ce 3 Tue Oct 10:30 PM Houston R 4 Wed Oct 7:30 PM Milwauke 5 Wed Oct 8:30 PM Atlanta Ha 6 Wed Oct 7:00 PM Charlotte 7 Wed Oct 7:00 PM Brooklyn I Home/Ne PTS Attend. Notes 99 Cleveland 122 Golden St 108 Boston Ce 117 Dallas Ma 90 Detroit Pi 131 Indiana Pa 91 Memphis 109 Orlando M 124 Phoenix S 105 Sacramen 99 San Anton 96 Utah Jazz 102 Box Score 121 Box Score 100 Box Score 111 Box Score 102 Box Score 140 Box Score 20562 19596 18624 19709 20491 8 Wed Oct 8:00 PM New Orle 9 Wed Oct 7:00 PM Miami He 10 Wed Oct 10:00 PM Portland T 11 Wed Oct 10:00 PM Houston R 12 Wed Oct 9:30 PM Minnesot 13 Wed Oct 9:00 PM Denver N 17794 103 Box Score 116 Box Score 76 Box Score 100 Box Score 107 Box Score 106 Box Score 14 Wed Oct 7:00 PM Philadelp 115 Washingt120 Box Score 15 Thu Oct 10:30 PM Los Angel108 Los Angel92 Box Score 17583 18418 17588 20356 18997 18203 16 Thu Oct1 8:00 PM New York 17 Thu Oc 7:30 PM Chicago B 18 Fri Oct 20 7:30 PM Orlando M 19 Fri Oct 20 7:00 PM Atlanta Ha 20 Fri Oct 20 8:30 PM Sacramen 21 Fri Oct 20 7:00 PM Portland T 22 Fri Oct 20 7:00 PM Cleveland 84 Oklahoma 100 Toronto R 21 Brooklyn 91 Charlotte 93 Dallas Ma 114 Indiana Pa 116 Milwauke 105 Box Score 117 Box Score 126 Box Score 109 Box Score 88 Box Score 96 Box Score 97 Box Score 16144 18417 19273 15325 18717 8:00 PM Utah Jazz Book+ A1 | Date 1 Date Start (ET) Visitor/NEPTS 2 Tue Oct1 8:01 PM Boston Ce 3 Tue Oct 10:30 PM Houston R 4 Wed Oct 7:30 PM Milwauke 5 Wed Oct 8:30 PM Atlanta Ha 6 Wed Oct 7:00 PM Charlotte 7 Wed Oct 7:00 PM Brooklyn I Home/Ne PTS Attend. Notes 99 Cleveland 122 Golden St 108 Boston Ce 117 Dallas Ma 90 Detroit Pi 131 Indiana Pa 91 Memphis 109 Orlando M 124 Phoenix S 105 Sacramen 99 San Anton 96 Utah Jazz 102 Box Score 121 Box Score 100 Box Score 111 Box Score 102 Box Score 140 Box Score 20562 19596 18624 19709 20491 8 Wed Oct 8:00 PM New Orle 9 Wed Oct 7:00 PM Miami He 10 Wed Oct 10:00 PM Portland T 11 Wed Oct 10:00 PM Houston R 12 Wed Oct 9:30 PM Minnesot 13 Wed Oct 9:00 PM Denver N 17794 103 Box Score 116 Box Score 76 Box Score 100 Box Score 107 Box Score 106 Box Score 14 Wed Oct 7:00 PM Philadelp 115 Washingt120 Box Score 15 Thu Oct 10:30 PM Los Angel108 Los Angel92 Box Score 17583 18418 17588 20356 18997 18203 16 Thu Oct1 8:00 PM New York 17 Thu Oc 7:30 PM Chicago B 18 Fri Oct 20 7:30 PM Orlando M 19 Fri Oct 20 7:00 PM Atlanta Ha 20 Fri Oct 20 8:30 PM Sacramen 21 Fri Oct 20 7:00 PM Portland T 22 Fri Oct 20 7:00 PM Cleveland 84 Oklahoma 100 Toronto R 21 Brooklyn 91 Charlotte 93 Dallas Ma 114 Indiana Pa 116 Milwauke 105 Box Score 117 Box Score 126 Box Score 109 Box Score 88 Box Score 96 Box Score 97 Box Score 16144 18417 19273 15325 18717 8:00 PM Utah Jazz Book+

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions