Skip to content

Commit 811f913

Browse files
committed
Remove unnecessary conditions
Remove unnecessary conditions
1 parent 3f5eb5d commit 811f913

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

python/pandasCommand.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,14 @@ def _vp_get_columns_list(df):
3636
cInfo['value'] = "'{}'".format(c)
3737
elif type(c).__name__ == 'Timestamp':
3838
cInfo['value'] = str(c)
39+
3940
# category - iopub data rate limit issue...
41+
cInfo['category'] = []
4042
if str(df[c].dtype) == 'object':
4143
uniqValues = df[c].dropna().unique()
4244
if len(uniqValues) <= 20:
4345
cInfo['category'] = [{ "value": "'{}'".format(u) if type(u) == str else u, "label": u } for u in uniqValues]
44-
else:
45-
cInfo['category'] = []
46-
else:
47-
cInfo['category'] = []
46+
4847
colList.append(cInfo)
4948
return colList
5049

0 commit comments

Comments
 (0)