[DataFrame] Adding error checking for pandas version (#1662)

* Adding error checking for pandas version

* Addressing comments
This commit is contained in:
Devin Petersohn
2018-03-06 09:57:49 -08:00
committed by Philipp Moritz
parent 0a6edb55a8
commit 4af42d5bb6
+10
View File
@@ -1,8 +1,18 @@
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pandas as pd
import threading
pd_version = pd.__version__
pd_major = int(pd_version.split(".")[0])
pd_minor = int(pd_version.split(".")[1])
if pd_major == 0 and pd_minor < 22:
raise Exception("In order to use Pandas on Ray, please upgrade your Pandas"
" version to >= 0.22.")
DEFAULT_NPARTITIONS = 4