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

Implement our own Factor class to mimic R's behavior. #52

Merged
merged 21 commits into from
Oct 29, 2023
Merged

Conversation

LTLA
Copy link
Member

@LTLA LTLA commented Oct 25, 2023

@LTLA LTLA marked this pull request as draft October 25, 2023 19:19
@LTLA
Copy link
Member Author

LTLA commented Oct 25, 2023

Needs #49 to be merged first, because I started work on the wrong branch 🤭

@LTLA
Copy link
Member Author

LTLA commented Oct 25, 2023

Also looks fine in the BiocFrame show method:

>>> biocframe.BiocFrame({ "Aaron": biocframe.Factor([1,2,3,4], levels=["A", "B", "C", "D", "E"]) } )
 BiocFrame with 4
      rows &
  {self.dims[1]}
  column{'s' if
self.dims[1] != 1
     else ''}
┏━━━━━━━━━━━━━━━━┓
┃ Aaron <Factor> ┃
┡━━━━━━━━━━━━━━━━┩
│ B              │
│ C              │
│ E              │
└────────────────┘

@jkanche
Copy link
Member

jkanche commented Oct 29, 2023

also fixes: #50

@jkanche
Copy link
Member

jkanche commented Oct 29, 2023

and fixes: #26

@jkanche jkanche linked an issue Oct 29, 2023 that may be closed by this pull request
@jkanche jkanche marked this pull request as ready for review October 29, 2023 03:41
@jkanche jkanche merged commit 00fbfb5 into master Oct 29, 2023
5 checks passed
@jkanche jkanche deleted the factors branch October 29, 2023 03:44
@jkanche jkanche restored the factors branch October 29, 2023 04:51
@jkanche jkanche deleted the factors branch October 29, 2023 04:52
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.

Don't attach row names during subsetting Generalize row/column index subsetting to any Sequence[int]
2 participants