-1
$\begingroup$
AttributeError                            Traceback (most recent call last)
<ipython-input-3-a2149c60e478> in <module>
      4 from shapely.geometry import MultiPoint
      5 df = pd.read_csv(r"D:\sandy\data\cairns-nov2019-data_2.csv")
----> 6 coords = df.as_matrix(columns=['Latitude','Longitude'])

~\AppData\Local\Continuum\anaconda3\lib\site-packages\pandas\core\generic.py in __getattr__(self, name)
   5272             if self._info_axis._can_hold_identifiers_and_holds_name(name):
   5273                 return self[name]
-> 5274             return object.__getattribute__(self, name)
   5275 
   5276     def __setattr__(self, name: str, value) -> None:

AttributeError: 'DataFrame' object has no attribute 'as_matrix'
$\endgroup$
0
$\begingroup$

Change that line to:

coords = df[["Latitude", "Longitude"]].values
| improve this answer | |
$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.