aliyun / alibabacloud-odps-maxframe-client

Apache License 2.0
3 stars 1 forks source link

Series.drop_duplicates not equal with pandas #12

Open snowljs opened 2 weeks ago

snowljs commented 2 weeks ago
import maxframe.dataframe as md  
s = md.Series(['lame', 'cow', 'lame', 'beetle', 'lame', 'hippo'],
              name='animal')
s.execute().fetch()
---
0      lame                
1       cow                
2      lame                
3    beetle                
4      lame                
5     hippo                
Name: animal, dtype: object
---
s.drop_duplicates().execute().fetch() 
---
3    beetle
1       cow
5     hippo
0      lame
0      lame
0      lame
Name: animal, dtype: object
---
s.drop_duplicates(keep='last').execute().fetch()
---
3    beetle
1       cow
5     hippo
4      lame
4      lame
4      lame
---
s.drop_duplicates(keep=False, inplace=True).execute().fetch()
---
3    beetle
1       cow
5     hippo
Name: animal, dtype: object

执行结果和pandas结果不一致 image