我有一个包含如下数据的 csv 文件:
我编写如下代码将 IP 地址转换为整数。
ifile = open('Alert_2_Only_1.csv', "rb")
read = csv.reader(codecs.iterdecode(ifile, 'utf-8'))
df = ifile.apply(pd.to_numeric)
但我收到此错误:
AttributeError: '_io.BufferedReader' object has no attribute 'apply'
请帮忙。谢谢