zhengruifeng commented on code in PR #48575:
URL: https://github.com/apache/spark/pull/48575#discussion_r1808126235
##########
python/pyspark/sql/types.py:
##########
@@ -3273,6 +3273,8 @@ def _from_numpy_type_to_java_type(
return gateway.jvm.double
elif nt == np.dtype("bool"):
return gateway.jvm.boolean
+ elif np.isdtype(nt, np.str_):
Review Comment:
check with:
```
In [1]: import numpy as np
In [2]: a = np.array([1, 2, 3], np.str_)
In [3]: a.dtype == np.dtype("str")
Out[3]: False
In [4]: np.isdtype(a.dtype, np.str_)
Out[4]: True
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]