-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
swapped dashes to underscores in my additions to skan df
- Loading branch information
1 parent
a98c65e
commit a72f9a7
Showing
1 changed file
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a72f9a7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is something I dealt with upstream in skan (see pull request) about a year ago and will ultimately be in new release is made as its already in the
main
branch, although here the names are explicitly declared forskan_df
rather than coming from the output ofskan
so these changes would have been needed anyway.The reason for avoiding
-
in Pandas data frames is it means you can't use the "dot notation" to refer to columns of the data frame as they interpreted as a subtraction^[1]. Thus if you have a DataFramedf
with columnsa, a-1, a-2
you can not usedf.a-1
to get the array. If you usea, a_1, a_2
as the column names you can usedf.a_1
to get the array/column.^[1]: Personally I prefer the bracket notation but Skan used dot notation and it was easier/more general to use
_
rather than-
as it was felt it would cause less problems upstream.