Skip to content

Commit

Permalink
Added docstring to stretch function
Browse files Browse the repository at this point in the history
The previous commit/push missed the doc string defined for the
`stretch` function.
  • Loading branch information
Brandyn Lucca committed Feb 8, 2024
1 parent 7a96ee2 commit 1a9e729
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions EchoPro/computation/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,13 +162,25 @@ def stretch( dataframe ,
index_variables = [ 'transect_num' , 'latitude' , 'longitude' , 'stratum_num' ] ,
sep = "_" ,
suffix = "\\w+" ):
"""_summary_
Args:
dataframe (_type_): _description_
"""
Melts dataframe into a parseable format
Returns:
_type_: _description_
Parameters
----------
dataframe: pd.DataFrame
A DataFrame object containing pertinent biological data
variable: str
Data variable name
variable_contrast: str
The name of the column that will be used to index the data variable
index_variables: str or List
A list or string of additional indexing/metadata variables that will be joined to the
data-of-interest
sep: str
A character indicating the separation of the variable names in the wide format, to be stripped
from the names in the long format
suffix: str
A regular expression capturing the wanted suffixes
"""
### Ensure variables are a list in case input is just a str
idx_lst = [ index_variables ] if isinstance( index_variables , str) else index_variables
Expand Down

0 comments on commit 1a9e729

Please sign in to comment.