After uploading csv file from local drive and wrapping it with stringIO,I used pd.read_csv to convert it into dataframe.
(从本地驱动器上传csv文件并用stringIO包装后,我使用pd.read_csv将其转换为数据帧。)
But unable to subtract a row from previous row. (但是无法从上一行减去一行。)
It shows TypeError: unsupported operand type(s) for -: 'str' and 'str' (它显示TypeError:-的不支持的操作数类型:“ str”和“ str”)
import pandas as pd
from google.colab import files
uploaded1= files.upload()
import io
df1= pd.read_csv(io.StringIO(uploaded1['sbi.csv'].decode('utf-8')))
df1.diff()
TypeError: unsupported operand type(s) for -: 'str' and 'str'
ask by Animal translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…