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

docs: Add that the number_of_rows will be set to 0 when removing the last column #384

Conversation

alex-senger
Copy link
Contributor

Closes #276

Summary of Changes

When removing the only column in a 1-column-table, the number_of_rows property is set to 0. This behaviour should be documented in the Table class docstring as well as in the following methods: Table.keep_only_columns, Table.remove_columns, Table.remove_columns_with_missing_values and Table.remove_columns_with_non_numerical_values.

@lars-reimann
Copy link
Member

lars-reimann commented Jun 23, 2023

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 1 0 0 0.64s
✅ PYTHON mypy 1 0 1.82s
✅ PYTHON ruff 1 0 0 0.02s
✅ REPOSITORY git_diff yes no 0.01s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@codecov
Copy link

codecov bot commented Jun 23, 2023

Codecov Report

Merging #384 (c759a0f) into main (1a9e08b) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##              main      #384   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           47        47           
  Lines         2353      2353           
=========================================
  Hits          2353      2353           
Impacted Files Coverage Δ
src/safeds/data/tabular/containers/_table.py 100.00% <ø> (ø)

Copy link
Contributor

@sibre28 sibre28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

…-when-removing-the-last-column-so-the-table-gets-empty
@alex-senger alex-senger enabled auto-merge (squash) June 23, 2023 13:10
…-when-removing-the-last-column-so-the-table-gets-empty
@alex-senger alex-senger merged commit 6f5c95e into main Jun 23, 2023
7 checks passed
@alex-senger alex-senger deleted the 276-tableremove_columns-specify-what-happens-when-removing-the-last-column-so-the-table-gets-empty branch June 23, 2023 14:00
@lars-reimann
Copy link
Member

🎉 This PR is included in version 0.14.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Included in a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Table.remove_columns(): Specify what happens when removing the last column, so the table gets empty
3 participants