-
Notifications
You must be signed in to change notification settings - Fork 6
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
Implemented reading RI from CSV data for PandasData #36
Conversation
Removed branch limitation from CI
@@ -44,13 +44,17 @@ def _init_rt_column_info(self): | |||
def _init_ri_column_info(self): | |||
""" Initialize retention index column name and set its position next to the retention time column. """ | |||
self._ri_index = 'retention_index' | |||
self._ri_position = self._rt_position + 1 | |||
if self._ri_index in self._data.columns: | |||
self._ri_position = self._data.columns.get_loc(self._ri_index) |
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.
That looks nice, I've had no idea something like get_loc
existed.
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 only for Pandas data frames. Found it in the documentation here.
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.
yup, I checked it out already :)
@@ -7,6 +7,7 @@ | |||
class PandasData(Data): | |||
""" Class to handle data from filetypes which can be imported into a pandas dataframe. """ | |||
_rt_column_names = set(['RT', 'rt', 'rts', 'retention_times', 'retention_time', 'retention', 'time']) | |||
_ri_column_names = set(['RI', 'ri', 'ris', 'retention_indices', 'retention_index', 'kovats', 'retentionindex']) |
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.
let's start a new standard to unite them all🤣
Fixes #30
Also introduces multiple possible names for the RI column.