Closed ktetz closed 5 years ago
This was by design. col only works with 'x' and row only works with 'y' while wrap works with both. I can look into supporting all options.
On Wed, Nov 21, 2018 at 2:33 PM Kevin Tetz notifications@github.com wrote:
Was trying to have to boxplots as columns and get error: GroupingError: Grouping column "y" is not in the DataFrame
Following the example: df = pd.read_csv(osjoin(os.path.dirname(fcp.file), 'tests', 'fake_data_box.csv')) Make a new y column
df['Value2'] = 2df['Value'] This fails:
fcp.boxplot(df=df, y=['Value', 'Value*2'], groups=['Batch', 'Sample', 'Region'], col='y', ax_size=[300, 300])
These both work: fcp.boxplot(df=df, y=['Value', 'Value 2'], groups=['Batch', 'Sample', 'Region'], wrap='y', ax_size=[300, 300]) fcp.boxplot(df=df, y=['Value', 'Value2'], groups=['Batch', 'Sample', 'Region'], row='y', ax_size=[300, 300])
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/endangeredoxen/fivecentplots/issues/9, or mute the thread https://github.com/notifications/unsubscribe-auth/ANgnIdYVP2F7UBDxqERhk9BAkPkOQBaLks5uxcasgaJpZM4Yt6_A .
Was trying to have to boxplots as columns and get error: GroupingError: Grouping column "y" is not in the DataFrame
Following the example: df = pd.read_csv(osjoin(os.path.dirname(fcp.file), 'tests', 'fake_data_box.csv'))
Make a new y column
df['Value2'] = 2df['Value']
This fails:
fcp.boxplot(df=df, y=['Value', 'Value*2'], groups=['Batch', 'Sample', 'Region'], col='y', ax_size=[300, 300])
These both work: fcp.boxplot(df=df, y=['Value', 'Value2'], groups=['Batch', 'Sample', 'Region'], wrap='y', ax_size=[300, 300]) fcp.boxplot(df=df, y=['Value', 'Value2'], groups=['Batch', 'Sample', 'Region'], row='y', ax_size=[300, 300])