Skip to content

Commit 8e7c112

Browse files
authored
Merge pull request #958 from dpryan79/fix941
Don't crash if figure_factory is imported but pandas isn't installed
2 parents e994e55 + edbd796 commit 8e7c112

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plotly/figure_factory/__init__.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
from __future__ import absolute_import
22

3+
from plotly import optional_imports
4+
35
# Require that numpy exists for figure_factory
46
import numpy
57

@@ -18,4 +20,5 @@
1820
from plotly.figure_factory._table import create_table
1921
from plotly.figure_factory._trisurf import create_trisurf
2022
from plotly.figure_factory._violin import create_violin
21-
from plotly.figure_factory._county_choropleth import create_choropleth
23+
if optional_imports.get_module('pandas') is not None:
24+
from plotly.figure_factory._county_choropleth import create_choropleth

0 commit comments

Comments
 (0)