-
Notifications
You must be signed in to change notification settings - Fork 928
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #601 from marketneutral/master
Add bqplot and qgrid
- Loading branch information
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import unittest | ||
import pandas as pd | ||
from qgrid import QgridWidget | ||
|
||
class TestQgrid(unittest.TestCase): | ||
def test_nans(): | ||
df = pd.DataFrame([(pd.Timestamp('2017-02-02'), np.nan), | ||
(4, 2), | ||
('foo', 'bar')]) | ||
view = QgridWidget(df=df) | ||
view._handle_qgrid_msg_helper({ | ||
'type': 'change_sort', | ||
'sort_field': 1, | ||
'sort_ascending': True | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import unittest | ||
import numpy as np | ||
import bqplot.pyplot as plt | ||
|
||
class TestBqplot(unittest.TestCase): | ||
def test_figure(self): | ||
size = 100 | ||
scale = 100.0 | ||
np.random.seed(0) | ||
x_data = np.arange(size) | ||
y_data = np.cumsum(np.random.randn(size) * scale) | ||
fig = plt.figure(title='First Example') | ||
plt.plot(y_data) | ||
fig.save_png() |