Skip to content

[python/r] Expose shape accessor for DataFrame [RFC]#3276

Closed
johnkerl wants to merge 2 commits intomainfrom
kerl/dataframe-shape
Closed

[python/r] Expose shape accessor for DataFrame [RFC]#3276
johnkerl wants to merge 2 commits intomainfrom
kerl/dataframe-shape

Conversation

@johnkerl
Copy link
Copy Markdown
Contributor

@johnkerl johnkerl commented Nov 1, 2024

Issue and/or context: As tracked on issue #2407 / [sc-51048].

Note that the intended Python and R API changes are all agreed on and finalized as described in #2407.

Changes:

Notes for Reviewer:

This is an RFC.

@johnkerl johnkerl marked this pull request as draft November 1, 2024 18:58
@johnkerl johnkerl changed the title Expose shape accessor for DataFrame [RFC] Expose shape accessor for DataFrame [RFC][WIP] Nov 1, 2024
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.78%. Comparing base (5f154bf) to head (5805c22).
Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3276      +/-   ##
==========================================
+ Coverage   83.67%   83.78%   +0.11%     
==========================================
  Files          51       51              
  Lines        5556     5557       +1     
==========================================
+ Hits         4649     4656       +7     
+ Misses        907      901       -6     
Flag Coverage Δ
python 83.78% <100.00%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
python_api 83.78% <100.00%> (+0.11%) ⬆️
libtiledbsoma ∅ <ø> (∅)

@johnkerl johnkerl force-pushed the kerl/dataframe-shape branch 2 times, most recently from c4b776f to 90d2b88 Compare November 1, 2024 22:12
@johnkerl
Copy link
Copy Markdown
Contributor Author

johnkerl commented Nov 5, 2024

I'm abandoning this for now.

What I hoped: users accustomed to saying adata.obs.shape should be able to say exp.obs.shape and it's weird if they can't.

A balancing problem: if not all soma_joinid values in the domain are written to, then when we produce a Pandas DataFrame out of the SOMA DataFrame, its pdf.shape != exp.obs.shape.

I made this proposal as a naïve, well-intentioned, and very non-comp-bio engineer -- but we need to let users make this call, not me.

@johnkerl johnkerl closed this Nov 5, 2024
@johnkerl johnkerl deleted the kerl/dataframe-shape branch November 18, 2024 16:22
@johnkerl johnkerl changed the title Expose shape accessor for DataFrame [RFC] [python/r] Expose shape accessor for DataFrame [RFC] Nov 19, 2024
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.

1 participant