Commits

Wes McKinney authored a3da22ecda8
ARROW-6227: [Python] Apply from_pandas option in pyarrow.array consistently across types Many sequence converters were not using the `from_pandas` option in `pyarrow.array` (which is `False` by default), so `NaN` and other pandas null sentinel values were being silently converted to Arrow null. For example as in the original report `pyarrow.array(['string', np.nan])` would return an array with 1 null. This is definitely not good. I made an effort to apply this consistently where it wasn't being applied and add appropriate unit tests. Some notes: * We don't consistently raise TypeError or ValueError on mixed type input. For example ``` In [4]: pa.array(['string', np.nan]) TypeError In [7]: pa.array([0, np.nan], type=pa.time32('s')) ValueError ``` * We weren't handling integer inputs for time32/time64 types (see ARROW-4111). That's fixed and tested in passing here (though not for correctness...) Closes #5150 from wesm/ARROW-6227 and squashes the following commits: 52362fa5f <Wes McKinney> Fix arrow-python-test, add time32/time64 tests for ARROW-4111. Add decimal test for null sentinels a85c3140a <Wes McKinney> Add additional test cases, support integers in time32/time64 8c0a3d5e0 <Wes McKinney> Use from_pandas option consistently in Python sequence converters Authored-by: Wes McKinney <wesm+git@apache.org> Signed-off-by: Wes McKinney <wesm+git@apache.org>