I try to importing clean_lat_long from dataprep. But I get TypeError instead
here's my code:
from dataprep.clean import clean_lat_long
But I get
TypeError Traceback (most recent call last)
Cell In[32], line 1
----> 1 from dataprep.clean import clean_lat_long
3 cleanedDF = clean_lat_long(data, "Coordinate", split=True)
File ~\anaconda3\lib\site-packages\dataprep\clean\__init__.py:6
1 """
2 dataprep.clean
3 ==============
4 """
----> 6 from .clean_lat_long import clean_lat_long, validate_lat_long
8 from .clean_email import clean_email, validate_email
10 from .clean_country import clean_country, validate_country
File ~\anaconda3\lib\site-packages\dataprep\clean\clean_lat_long.py:9
6 from typing import Any, Optional, Tuple, Union
8 import dask
----> 9 import dask.dataframe as dd
10 import numpy as np
11 import pandas as pd
File ~\anaconda3\lib\site-packages\dask\dataframe\__init__.py:6
4 import dask.dataframe._pyarrow_compat
5 from dask.base import compute
----> 6 from dask.dataframe import backends, dispatch, rolling
7 from dask.dataframe.core import (
8 DataFrame,
9 Index,
(...)
15 to_timedelta,
16 )
17 from dask.dataframe.groupby import Aggregation
File ~\anaconda3\lib\site-packages\dask\dataframe\backends.py:10
7 import pandas as pd
8 from pandas.api.types import is_scalar, union_categoricals
---> 10 from dask.array.core import Array
11 from dask.array.dispatch import percentile_lookup
12 from dask.array.percentile import _percentile
File ~\anaconda3\lib\site-packages\dask\array\__init__.py:4
1 from __future__ import annotations
3 try:
----> 4 from dask.array import backends, fft, lib, linalg, ma, overlap, random
5 from dask.array.blockwise import atop, blockwise
6 from dask.array.chunk_types import register_chunk_type
File ~\anaconda3\lib\site-packages\dask\array\backends.py:8
5 import numpy as np
7 from dask.array import chunk
----> 8 from dask.array.core import Array
9 from dask.array.dispatch import (
10 concatenate_lookup,
11 divide_lookup,
(...)
19 to_numpy_dispatch,
20 )
21 from dask.array.numpy_compat import divide as np_divide
File ~\anaconda3\lib\site-packages\dask\array\core.py:30
27 from typing import Any, TypeVar, Union, cast
29 import numpy as np
---> 30 from numpy.typing import ArrayLike
31 from tlz import accumulate, concat, first, frequencies, groupby, partition
32 from tlz.curried import pluck
File ~\anaconda3\lib\site-packages\numpy\typing\__init__.py:158
1 """
2 ============================
3 Typing (:mod:`numpy.typing`)
(...)
153
154 """
155 # NOTE: The API section will be appended with additional entries
156 # further down in this file
--> 158 from numpy._typing import (
159 ArrayLike,
160 DTypeLike,
161 NBitBase,
162 NDArray,
163 )
165 __all__ = ["ArrayLike", "DTypeLike", "NBitBase", "NDArray"]
167 if __doc__ is not None:
File ~\anaconda3\lib\site-packages\numpy\_typing\__init__.py:148
95 from ._nbit import (
96 _NBitByte as _NBitByte,
97 _NBitShort as _NBitShort,
(...)
105 _NBitLongDouble as _NBitLongDouble,
106 )
107 from ._char_codes import (
108 _BoolCodes as _BoolCodes,
109 _UInt8Codes as _UInt8Codes,
(...)
146 _ObjectCodes as _ObjectCodes,
147 )
--> 148 from ._scalars import (
149 _CharLike_co as _CharLike_co,
150 _BoolLike_co as _BoolLike_co,
151 _UIntLike_co as _UIntLike_co,
152 _IntLike_co as _IntLike_co,
153 _FloatLike_co as _FloatLike_co,
154 _ComplexLike_co as _ComplexLike_co,
155 _TD64Like_co as _TD64Like_co,
156 _NumberLike_co as _NumberLike_co,
157 _ScalarLike_co as _ScalarLike_co,
158 _VoidLike_co as _VoidLike_co,
159 )
160 from ._shape import (
161 _Shape as _Shape,
162 _ShapeLike as _ShapeLike,
163 )
164 from ._dtype_like import (
165 DTypeLike as DTypeLike,
166 _DTypeLike as _DTypeLike,
(...)
180 _DTypeLikeComplex_co as _DTypeLikeComplex_co,
181 )
File ~\anaconda3\lib\site-packages\numpy\_typing\_scalars.py:13
10 # The 6 `<X>Like_co` type-aliases below represent all scalars that can be
11 # coerced into `<X>` (with the casting rule `same_kind`)
12 _BoolLike_co = Union[bool, np.bool_]
---> 13 _UIntLike_co = Union[_BoolLike_co, np.unsignedinteger[Any]]
14 _IntLike_co = Union[_BoolLike_co, int, np.integer[Any]]
15 _FloatLike_co = Union[_IntLike_co, float, np.floating[Any]]
TypeError: 'type' object is not subscriptable
What should I do to fix it?