Hi Martin
Thank you for sharing this! This is exactly what I want to do but for a very basic/beginner project. I am brand new to Python, only installing it to run your script — so thanks for giving me the resources to start learning something new.
When running the script, I am getting a key error on latitude. Full error below. I am guessing the issue is that it things my latitude should be a string but is recognising it as an integer.
My input file is basic. Two columns, A and B, with just four rows of lat/longs.
Any ideas?
Thanks!
Traceback (most recent call last):
File “C:\Users\lumsdena\AppData\Local\Programs\Python\Python37–32\lib\site-packages\pandas\core\indexes\base.py”, line 3124, in get_value
return libindex.get_value_box(s, key)
File “pandas\_libs\index.pyx”, line 55, in pandas._libs.index.get_value_box
File “pandas\_libs\index.pyx”, line 63, in pandas._libs.index.get_value_box
TypeError: ‘str’ object cannot be interpreted as an integer
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “C:\Users\lumsdena\Documents\Google Maps API\from marty.py”, line 27, in <module>
LatOrigin = row1[‘Latitude’]
File “C:\Users\lumsdena\AppData\Local\Programs\Python\Python37–32\lib\site-packages\pandas\core\series.py”, line 767, in __getitem__
result = self.index.get_value(self, key)
File “C:\Users\lumsdena\AppData\Local\Programs\Python\Python37–32\lib\site-packages\pandas\core\indexes\base.py”, line 3132, in get_value
raise e1
File “C:\Users\lumsdena\AppData\Local\Programs\Python\Python37–32\lib\site-packages\pandas\core\indexes\base.py”, line 3118, in get_value
tz=getattr(series.dtype, ‘tz’, None))
File “pandas\_libs\index.pyx”, line 106, in pandas._libs.index.IndexEngine.get_value
File “pandas\_libs\index.pyx”, line 114, in pandas._libs.index.IndexEngine.get_value
File “pandas\_libs\index.pyx”, line 162, in pandas._libs.index.IndexEngine.get_loc
File “pandas\_libs\hashtable_class_helper.pxi”, line 1492, in pandas._libs.hashtable.PyObjectHashTable.get_item
File “pandas\_libs\hashtable_class_helper.pxi”, line 1500, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: ‘Latitude’