diff --git a/pyo3-polars/src/lib.rs b/pyo3-polars/src/lib.rs index e40437e..206fd90 100644 --- a/pyo3-polars/src/lib.rs +++ b/pyo3-polars/src/lib.rs @@ -172,7 +172,10 @@ impl IntoPy for PySeries { fn into_py(self, py: Python<'_>) -> PyObject { let polars = py.import_bound("polars").expect("polars not installed"); let s = polars.getattr("Series").unwrap(); - match s.getattr("_import_arrow_from_c") { + match s + .getattr("_import_arrow_from_c") + .or_else(|_| s.getattr("_import_from_c")) + { // Go via polars Ok(import_arrow_from_c) => { // Get supported compatibility level