Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix max_n for tabular data show_batch function #3998

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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

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.

None yet

1 participant