mirror of
https://github.com/apache/arrow.git
synced 2026-10-28 16:47:19 +08:00
Accept list input in Array.from_pandas
Change-Id: I33905efd13d3b3f55ac0f1e9cc84b9d6ef4bae7d
This commit is contained in:
1 parent
16aa9d6fbc
commit
285f863028
2 files changed
+5
-4
No files matched your search
@@ -161,6 +161,7 @@ else()
|
||||
set(_PYTHON_LIBS_SEARCH "${PYTHON_PREFIX}/lib" "${PYTHON_LIBRARY_PATH}")
|
||||
endif()
|
||||
message(STATUS "Searching for Python libs in ${_PYTHON_LIBS_SEARCH}")
|
||||
message(STATUS "Looking for python${PYTHON_LIBRARY_SUFFIX}")
|
||||
# Probably this needs to be more involved. It would be nice if the config
|
||||
# information the python interpreter itself gave us were more complete.
|
||||
find_library(PYTHON_LIBRARY
|
||||
@@ -237,4 +238,4 @@ FUNCTION(PYTHON_ADD_MODULE _NAME )
|
||||
ENDIF()
|
||||
|
||||
ENDIF(PYTHON_ENABLE_MODULE_${_NAME})
|
||||
ENDFUNCTION(PYTHON_ADD_MODULE)
|
||||
ENDFUNCTION(PYTHON_ADD_MODULE)
|
||||
@@ -246,8 +246,6 @@ cdef wrap_array_output(PyObject* output):
|
||||
else:
|
||||
return obj
|
||||
|
||||
return values
|
||||
|
||||
|
||||
cdef class NullArray(Array):
|
||||
pass
|
||||
@@ -405,8 +403,10 @@ cdef object get_series_values(object obj):
|
||||
|
||||
if isinstance(obj, pd.Series):
|
||||
result = obj.values
|
||||
else:
|
||||
elif isinstance(obj, np.ndarray):
|
||||
result = obj
|
||||
else:
|
||||
result = pd.Series(obj).values
|
||||
|
||||
return result
|
||||
|
||||
|
||||
Reference in new issue
Block a user