Skip to content

Commit

Permalink
fix for sampledata
Browse files Browse the repository at this point in the history
  • Loading branch information
dmnfarrell committed Apr 1, 2018
1 parent 48a3856 commit 7601d03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pandastable/data.py
Expand Up @@ -87,8 +87,8 @@ def genstr(n=2):
df[col2] = df[col1]*np.random.normal(.8, .2, len(df))
df = np.round(df, 3)
cats = ['low','medium','high','very high']
df['label'] = pd.cut(df[col1], bins=4, labels=cats)
df['label'] = df.label.cat.as_ordered()
df['label'] = pd.cut(df[col1], bins=4, labels=cats).astype(str)
#df['label'] = df.label.cat.as_ordered()
#don't add date if rows too large
if rows<2e6:
df['date'] = pd.date_range('1/1/2016', periods=rows, freq='H')
Expand Down

0 comments on commit 7601d03

Please sign in to comment.