ValueError: x and y must be the same size

后端 未结 4 1672
抹茶落季
抹茶落季 2020-12-11 03:16
import numpy as np
import pandas as pd
import matplotlib.pyplot as pt

data1 = pd.read_csv(\'stage1_labels.csv\')

X = data1.iloc[:, :-1].values
y = data1.iloc[:, 1]         


        
4条回答
  •  南笙
    南笙 (楼主)
    2020-12-11 03:54

    Try this:

    x_train=np.arange(0,len(x_train),1)
    

    It will make an evenly spaced array and your error will be gone permanently.

提交回复
热议问题