We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f58d815 commit 4ddfa93Copy full SHA for 4ddfa93
pandas/core/arrays/string_arrow.py
@@ -36,14 +36,20 @@
36
except ImportError:
37
pass
38
else:
39
- ARROW_CMP_FUNCS = {
40
- "eq": pc.equal,
41
- "ne": pc.not_equal,
42
- "lt": pc.less,
43
- "gt": pc.greater,
44
- "le": pc.less_equal,
45
- "ge": pc.greater_equal,
46
- }
+ # pyarrow 0.16.0 adds a compute module (thus the above compute import
+ # will work) but the attributes below are not available until pyarrow
+ # 1.0.0 resulting in an Attribute Error with pyarrow (0.16.0, 1.0.0].
+ try:
+ ARROW_CMP_FUNCS = {
+ "eq": pc.equal,
+ "ne": pc.not_equal,
+ "lt": pc.less,
47
+ "gt": pc.greater,
48
+ "le": pc.less_equal,
49
+ "ge": pc.greater_equal,
50
+ }
51
+ except AttributeError:
52
+ pass
53
54
55
if TYPE_CHECKING:
0 commit comments