[GitHub] [arrow] danepitkin commented on pull request #33810: GH-33377: [Python] Table.drop should support passing a single column
danepitkin commented on PR #33810: URL: https://github.com/apache/arrow/pull/33810#issuecomment-1401286580 I decided to name it `Table.drop_columns` instead of `Table.drop_column` to better communicate the possible actions. Also, instead of a wrapper with a warning, what if we alias it directly with `drop = drop_columns`? I'm not sure if we can still add the warning anymore, but maybe we don't need to officially deprecate the API if there is no timeline for removal. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [arrow] danepitkin commented on pull request #33810: GH-33377: [Python] Table.drop should support passing a single column
danepitkin commented on PR #33810: URL: https://github.com/apache/arrow/pull/33810#issuecomment-1400537970 Thanks, Rok! > I would slightly prefer `Table.drop_column()` over `Table.drop_column()` and `Table.drop()`. I don't know if `.drop` -> `.drop_column` makes sense at this point. [Pandas uses `.drop` for everything](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.drop.html) but it does index dropping as well. Perhaps you could just alias the two and introduce a deprecation warning? (e.g. [here](https://github.com/apache/arrow/blob/a16c54567ada6729311fd26bdbee4b5e61901410/python/pyarrow/plasma.py#L118)). I like this plan. Also, I think this is what the original issue was requesting and I just misread it! I'll update the ticket with `Table.drop_column()` and mark `Table.drop()` with a deprecation warning. While Arrow does append the word `_column` to other `Table` modification APIs (e.g. `add_column` in arrow, `add` in pandas), I'd be hesitant to remove `Table.drop()` anytime soon, if ever. Breaking backwards compatibility for minor API UX improvements goes against providing a good UX in general. Just wanted to document my thinking here. Overall, I am aligned with you! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [arrow] danepitkin commented on pull request #33810: GH-33377: [Python] Table.drop should support passing a single column
danepitkin commented on PR #33810: URL: https://github.com/apache/arrow/pull/33810#issuecomment-1399047969 This is my first Arrow PR. I am very open to any feedback or suggestions you might have! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org