Home > other >  The conversion panda format so why not a line
The conversion panda format so why not a line

Time:12-05

The building Lord small white, when dealing with an excel machine learning recently discovered a problem, with panda import and are as follows: after
Train_x test_x, train_y, test_y=train_test_split (BOOK [' level '], the BOOK [' target '], train_size=0.7, test_size=0.3, random_state=0)
The format processing:
Train_x1=torch. FloatTensor (train_x)
No problem, but strange to
Test_x=torch. FloatTensor (test_x) the following problems
ValueError: could not determine the shape of the object type 'Series'
But I print out these two are the same format and appearance, the shape and trainx test_x is 3:7, is the style of the (XXXX,)
And I put 0.7 above, the ratio of 0.3 to 0.3, and 0.7 testx was no problem, after the proportion of trainx appeared the same problem, no problem, less problematic, is also related to the number?
Is in doubt, search also no answer, I hope you know it
  • Related