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

Teach how to create a new column in Ibis? #236

Open
joelostblom opened this issue Sep 7, 2023 · 1 comment · Fixed by #302
Open

Teach how to create a new column in Ibis? #236

joelostblom opened this issue Sep 7, 2023 · 1 comment · Fixed by #302
Labels
enhancement New feature or request needs-investigation Further information is requested

Comments

@joelostblom
Copy link
Collaborator

Currently, in the textbook we show how to filter data using Ibis, but we don't show how to create new columns. Filtering the data looks the same as in pandas, but creating a new columns uses mutate instead of assign. In the reading tutorial, we both create a new column and filter the data. This means that it now matters which line calls execute to create the pandas dataframe from the database, since students have to do that before getting access to assign. We are solving this now by calling execute up front, but this is teaching students a bad habit since it creates an unnecessarily big data frame and negates many of the benefits with working with a database and ibis. Also see https://github.ubc.ca/UBC-DSCI/dsci-100-instructor/issues/836

@trevorcampbell trevorcampbell added enhancement New feature or request needs-investigation Further information is requested 1st edition Planned for inclusion in 1st print edition labels Sep 17, 2023
@trevorcampbell
Copy link
Contributor

trevorcampbell commented Nov 13, 2023

I closed this as part of #302 -- I thought we didn't cover mutate/assignment in Ch1, so wasn't easy to discuss mutation/assignment for databases in Ch2. But I'm re-opening this because I discovered that we do indeed teach mutate in ch1 now, so it's possible to refer to that in Ch2 in the context of DBs.

(But I am leaving this out of 1st edition -- it's a minor change and not super important to get into print)

@trevorcampbell trevorcampbell removed the 1st edition Planned for inclusion in 1st print edition label Nov 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-investigation Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants