- I'm trying to convert a csv file that is in pandas data frame type, into an integer.
- I already tried pandas astype way
- Any second look or advice is well received
import csv
import pandas as pd
from pandas import DataFrame
col_list = ["Solicitud"]
daf = pd.read_csv(r"C:\Users\N\inapi_scraper\solicitudes_v0.csv", usecols=[0], names=['Solicitud'], header=None)#, usecols=col_list)
datf=daf[0:737]
df[datf] = df[datf].astype(dtype=int)
I always receive this error:
TypeError: 'type' object is not subscriptable