Skip to content

Commit

Permalink
Fix #24
Browse files Browse the repository at this point in the history
  • Loading branch information
gtnx committed Sep 2, 2015
1 parent 7c7cba8 commit 3938e94
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 4 additions & 2 deletions pandas_highcharts/display.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# -*- coding: utf-8 -*-

from __future__ import absolute_import

"""Functions to quickly display charts in a Notebook.
"""

Expand All @@ -11,7 +13,7 @@
from IPython.core import getipython
from IPython.core.display import display, HTML

from core import serialize
from .core import serialize


# Note that Highstock includes all Highcharts features.
Expand All @@ -34,7 +36,7 @@ def load_highcharts():
def _generate_div_id_chart(prefix="chart_id", digits=8):
"""Generate a random id for div chart.
"""
choices = (random.randrange(0, 52) for _ in xrange(digits))
choices = (random.randrange(0, 52) for _ in range(digits))
return prefix + "".join((string.ascii_letters[x] for x in choices))


Expand Down
5 changes: 4 additions & 1 deletion pandas_highcharts/tests.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# -*- coding: utf-8 -*-

from .core import serialize, json_encode
from __future__ import absolute_import

import datetime
import json
import pandas
from unittest import TestCase

from .core import serialize, json_encode

df = pandas.DataFrame([
{'a': 1, 'b': 2, 'c': 3, 't': datetime.datetime(2015, 1, 1), 's': 's1'},
{'a': 2, 'b': 4, 'c': 6, 't': datetime.datetime(2015, 1, 2), 's': 's2'}
Expand Down

0 comments on commit 3938e94

Please sign in to comment.