|
@@ -90,8 +90,9 @@ class DataFrameToCollection():
|
|
|
|
|
|
# check that there is only one possible value of this field
|
|
|
n_distinct_values = data.groupby(grp_fields, sort=False)[field].nunique().max()
|
|
|
-
|
|
|
- if n_distinct_values != 1:
|
|
|
+
|
|
|
+ #n_distinct_valus can be 0 if the column only contains NaN values
|
|
|
+ if n_distinct_values > 1:
|
|
|
err = "Field {0} is not unique with respect to {1}"\
|
|
|
.format(field, grp_fields)
|
|
|
|