TypeError: unhashable type: 'slice' for pandas

前端 未结 4 2214
甜味超标
甜味超标 2021-02-19 14:27

I have a pandas datastructure, which I create like this:

test_inputs = pd.read_csv(\"../input/test.csv\", delimiter=\',\')

Its shape

         


        
4条回答
  •  终归单人心
    2021-02-19 15:00

    I was facing the same problem. Even the above solutions couldn't fix it. It was some problem with pandas, What I did was I changed the array into a numpy array and then there was no problem.

    import pandas as pd
    import numpy as np
    test_inputs = pd.read_csv("../input/test.csv", delimiter=',')
    test_inputs = np.asarray(test_inputs)
    

提交回复
热议问题