Skip to content

Commit

Permalink
DOC: fixed geo accessor example in extending.rst (pandas-dev#25420)
Browse files Browse the repository at this point in the history
I realised "lon" and "lat" had just been switched with "longitude" and "latitude" in the following code block. So I used those names here as well.
  • Loading branch information
ThibTrip authored and Pingviinituutti committed Feb 28, 2019
1 parent 4cbed72 commit 4229ea0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions doc/source/development/extending.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ decorate a class, providing the name of attribute to add. The class's
@staticmethod
def _validate(obj):
if 'lat' not in obj.columns or 'lon' not in obj.columns:
raise AttributeError("Must have 'lat' and 'lon'.")
# verify there is a column latitude and a column longitude
if 'latitude' not in obj.columns or 'longitude' not in obj.columns:
raise AttributeError("Must have 'latitude' and 'longitude'.")
@property
def center(self):
Expand Down

0 comments on commit 4229ea0

Please sign in to comment.