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

Fixing ColReader #3602

Merged
merged 2 commits into from
Mar 4, 2022
Merged

Fixing ColReader #3602

merged 2 commits into from
Mar 4, 2022

Conversation

hiromis
Copy link
Contributor

@hiromis hiromis commented Mar 3, 2022

I came across a similar issue as #3164 with a column named 'mask'. This time, it was a conflict with DataFrame's function called mask (https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.mask.html).

Here is an example I took from a tutorial that uses ColReader to reproduce the issue:
https://gist.github.com/hiromis/e371603e71543cd7cca9cea7dfcc7609

I could have added 'mask' to a list of special cases along with 'name' and 'cat', but I thought checking whether r is a namedtuple containing a field c may be cleaner.

The existing tests ran fine, and I also did a sanity check using the example notebook:
https://gist.github.com/hiromis/7a0863072694faa5a0f6fb0bbcb3d2da

@hiromis hiromis requested a review from jph00 as a code owner March 3, 2022 04:14
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@jph00 jph00 merged commit d84b426 into fastai:master Mar 4, 2022
@jph00
Copy link
Member

jph00 commented Mar 4, 2022

Many thanks!

@jph00 jph00 added the bug label Apr 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants