Пытаясь отфильтровать информацию, я заметил, что отсутствует информация, которая действительно есть в Excel
Код: Выделить всё
groupby_df = df.groupby(['Year','Week','column_a','column_b','column_c','column_d','column_e','column_f']).size().reset_index(name='Amount')
"""
I stoped using the filter because I notice that it didn't have the data of week 44 and year 2024
"""
df['Week'] = df['Week'].astype('int64') #I thought the problem was that the column was a 'UInt32' 32 bits integer so I change it to the one I have used ('int64')
print(df.info()) # Checking if the astype function actually did a change
df_week = df[df['Week']==44]
print(df_week['Year'].unique())
#it print [2023] and it should've also 2024Кто-нибудь знает, в чем может быть проблема?
Подробнее здесь: https://stackoverflow.com/questions/791 ... ssing-rows
Мобильная версия