当我尝试读取数据时,出现以下错误。 MemoryError:无法为形状为(131072,)和数据类型为int64的数组分配1.00 MiB
请找到我使用的代码
print("creating the dataframe from data.csv file..")
df = pd.read_csv('data.csv', sep=',',
names=['movie', 'user','rating','date'])
df.date = pd.to_datetime(df.date)
print('Done.\n')
# we are arranging the ratings according to time.
print('Sorting the dataframe by date..')
df.sort_values(by='date', inplace=True)
print('Done..')