Row = str(row).replace('\\', '') #deleting backslash Path = "C:\\Users\\Souro\\Downloads\\AXISBANK.csv" I think it is better to first import your text in an array or a string and then split it and save into the dataframe specifically when your data is not too large. txt file that is not really written there but is copied when its content is loaded somewhere. The problem might arise because of the meta-text in the. ValueError: could not convert string to float: '"Date"' > 1068 items = ġ070 # Then pack it according to the dtype's nestingĬ:\python3.7.2\lib\site-packages\numpy\lib\npyio.py in (.0)Ĭ:\python3.7.2\lib\site-packages\numpy\lib\npyio.py in floatconv(x) > 1141 for x in read_data(_loadtxt_chunksize):Ĭ:\python3.7.2\lib\site-packages\numpy\lib\npyio.py in read_data(chunk_size)ġ067 # Convert each value according to its column and store > 1 np.loadtxt(r"C:\Users\Souro\Downloads\Data.csv",delimiter=",")Ĭ:\python3.7.2\lib\site-packages\numpy\lib\npyio.py in loadtxt(fname, dtype, comments, delimiter, converters, skiprows, usecols, unpack, ndmin, encoding, max_rows) ValueError Traceback (most recent call last) Np.loadtxt(r"C:\Users\Souro\Downloads\Data.csv",delimiter=",")īut it shows the following error after compiling:. I am trying to load stock market data csv file in a jupyter note book using import numpy as np
0 Comments
Leave a Reply. |