8000 Fix max_n for tabular data show_batch function by brettshollenberger · Pull Request #3998 · fastai/fastai · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@brettshollenberger
Copy link
@brettshollenberger brettshollenberger commented Dec 30, 2023

Why

show_batch for tabular data doesn't respect the max_n parameter.

Reproduce the error:

import numpy as np
import pandas as pd
from fastai.tabular.all import TabularPandas

df = pd.DataFrame({"A": [1,2,3,4,5,6,7,8,9,10], "ys": np.ones(20)})
tp = TabularPandas(df, cat_names=[], cont_names=["A"], y_names="ys")
dls = tp.dataloaders(bs=5)
dls.show_batch(max_n=3)
 # 5 rows are shown

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0