Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pyarrow: Check compatibility of pyarrow-backed pandas objects with nu…
…meric dtypes (#2774) * Ensure that pyarrow backed pandas.Series can be read Install pyarrow as an optional dependency, and check that pandas.Series objects backed by pyarrow dtypes (e.g. 'uint8[pyarrow]') can be read by virtualfile_from_vectors. * Ensure that pygmt.info can work with pyarrow int64/float64 dtypes Check that pandas.Series and pandas.DataFrame objects backed by pyarrow dtypes (e.g. 'int64[pyarrow]' and 'float64[pyarrow]') can be read by pygmt.info. * Add xfail test for test_geopandas_plot_int_dtypes casting to pyarrow int Geopandas doesn't support casting to pyarrow dtypes like 'int32[pyarrow]' and 'int64[pyarrow]' yet, but adding an xfail test so that we don't forget to test in the future. * Clarify reason for test_geopandas_plot_int_dtypes xfail Actually, casting to pyarrow integer dtypes work, but writing to the temporary OGR_GMT file doesn't. * Add optional pyarrow dependency to ci_test_dev and ci_tests_legacy Ensure that previous and future versions of GMT are compatible with PyArrow too. * Add note about support of PyArrow dtypes to doc/install.rst Mention that PyGMT does have some initial support of Pandas objects backed by PyArrow-dtype arrays, but only uint/int/float dtypes for now. * Use importlib.util.find_spec instead of try-except block Cleaner way to check if pyarrow is installed or not. --------- Co-authored-by: Dongdong Tian <[email protected]>
- Loading branch information