Skip to content

questionnaire functions return 0.0 when row entries are NaN --> should return NaN #48

Description

@victoria1509

Description
Returning 0.0 instead of NaN in certain questionnaire functions in Biopsykit when the entries (rows) contain only NaN values, particularly when calculating the sum. For instance, NaN is returned as the value when calculating the mean for a subscale/score.

To Reproduce
Steps to reproduce the behavior:

  1. Use Biopsykit functions that involve sum calculations for subscales/scores.
  2. Provide a dataset with rows containing only NaN values.3.
  3. Calculate the score/subscales
  4. Check NaN rows in returned df

Expected behavior
When calculating the sum for a subscale/score, the function should return NaN if the participant's row contains only NaN values.

System Specifications:

  • Operating System: macOS
  • BioPsyKit version: 0.9.0
  • Python version: 3.9

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions