Skip to content

Conversation

@Mr-F
Copy link

@Mr-F Mr-F commented Dec 29, 2017

When processing data, sometimes you end up with a column of null values. If this is then pushed into a pipeline of operations which include calculating the mean on that column, then the whole process errors out.

I've opted to return None in these situations. Originally, I planned to return '0' feeling it would be more in keeping with the expected data type from the mean operation. However, upon reflection, I think this would be a mistake as if the column normally contains '0' and '1' then it might be confusing and misleading.

Keith added 3 commits December 22, 2017 11:18
…ng about this some more it seems better to return a None value when there are no values to calculate a Mean of.
@Mr-F Mr-F mentioned this pull request Dec 29, 2017
lcorbasson added a commit to lcorbasson/agate that referenced this pull request Dec 5, 2019
@jpmckinney jpmckinney merged commit b2d1ebb into wireservice:master Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants