Skip to content

Suggestion : Standardize the return type and reduce repetition code #2

@msarahymn

Description

@msarahymn

Hello,
I was looking at your Fitbit Health Data Analyzer as part of this week review task.
I noticed some part that could be improved for efficiency on the filter_data.py
First, there is inconsistency of return type. On the filter_by_user() returns a dictionary of data frame while other function returns basic data frame. You could standardize the return types across all function.
Then on the function filter_by_user() there are some repetition codes for ensure the data frame are not empty and contain ‘Id’ column for Hour, Minute and Daily. Maybe it could be centralized with loop to reduce repetition code.
These are just suggestions that might make maintenance easier as the project grows. Thanks for reading.

Best Regards,
Maisyaroh

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions