-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
Closed
Labels
GroupbyNeeds TestsUnit test(s) needed to prevent regressionsUnit test(s) needed to prevent regressionsgood first issue
Description
For Example, fillna requires method kwarg to be specified. the frame method
raises an exception if it is missing, but transform silently returns an empty frame
In [22]: df=pd.DataFrame(dict(price=[10,10,20,20,30,30],color=[10,10,20,20,30,30],cost=(100,200,300,400,500,600)))
...: g=df.groupby(['price'])
...: try:
...: df.fillna()
...: except:
...: print("Raised: OK")
...: try:
...: g.fillna()
...: except:
...: print("Raised: OK")
...: else:
...: print("Raised: No, Failed")
...: try:
...: g.transform('fillna')
...: except:
...: print("Raised: OK")
...: else:
...: print("Raised: No, Failed")
Raised: OK
Raised: No, Failed
Raised: No, FailedMetadata
Metadata
Assignees
Labels
GroupbyNeeds TestsUnit test(s) needed to prevent regressionsUnit test(s) needed to prevent regressionsgood first issue