Skip to content

Commit d94b09a

Browse files
committed
simplify pandas import
1 parent 70f1e20 commit d94b09a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pysces/PyscesModel.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,13 +1485,12 @@ def __init__(self, File=None, dir=None, loader='file', fString=None, autoload=Tr
14851485
self.__PSC_auto_load = False
14861486

14871487
# autoload a custom datatype ... currently pandas
1488-
if __CUSTOM_DATATYPE__ == 'pandas':
1488+
if __CUSTOM_DATATYPE__ == 'pandas':
14891489
if _checkPandas():
14901490
self.enableDataPandas(True)
14911491
else:
14921492
self.enableDataPandas(False)
14931493

1494-
14951494
def enableDataPandas(self, var=True):
14961495
"""
14971496
Toggle custom data type for `mod.sim` and `mod.scan` objects.
@@ -1500,7 +1499,7 @@ def enableDataPandas(self, var=True):
15001499
"""
15011500
if var:
15021501
try:
1503-
import pandas as pandas
1502+
import pandas
15041503
self.__pandas = pandas
15051504
self.__settings__['custom_datatype'] = 'pandas'
15061505
print('Pandas output enabled.')

0 commit comments

Comments
 (0)