pycytominer
pycytominer copied to clipboard
FeatureRequest: Add `keep_df` parameter in output function as an option to return the dataframe
Feature type
-
[X] Add new functionality
-
[ ] Change existing functionality
General description of the proposed functionality
@axiomcura first discovered this issue.
Currently, when using the output
function, it does not output the data frame, only the string of the path. When used in the major functions, that means that a user won't be able to view the data after it is processed. It would be nice to have a parameter to output the data frame so users can see if the function worked.
Feature example
def output(
df: pd.DataFrame,
output_filename: str,
output_type: str = "csv",
sep: str = ",",
float_format: Optional[str] = None,
compression_options: Union[str, Dict] = {"method": "gzip", "mtime": 1},
keep_df: Optional[bool] = False
**kwargs,
):
By adding this parameter, you would be able to specify if you want the data frame returned.
Alternative Solutions
No response
Additional information
No response