Skip to content

Commit

Permalink
BUG: Fix index on the left side too
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelsey Jordahl committed Apr 28, 2015
1 parent e22d654 commit a1988eb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion geopandas/tools/sjoin.py
Expand Up @@ -78,7 +78,7 @@ def find_contains(a1, a2):
r_idx,
check_predicates(
left_df['geometry']
.apply(lambda x: prepared.prep(x)).values[l_idx],
.apply(lambda x: prepared.prep(x))[l_idx],
right_df['geometry'][r_idx])
]))
)
Expand Down
6 changes: 2 additions & 4 deletions tests/test_sjoin.py
Expand Up @@ -76,10 +76,8 @@ def test_sjoin_values(self):
self.polydf.index = [1, 3, 4, 5, 6]
df = sjoin(self.pointdf, self.polydf, how='left')
self.assertEquals(df.shape, (21,8))
for i, row in df.iterrows():
self.assertEquals(row.geometry.type, 'Point')
self.assertTrue('pointattr1' in df.columns)
self.assertTrue('BoroCode' in df.columns)
df = sjoin(self.polydf, self.pointdf, how='left')
self.assertEquals(df.shape, (12,8))

@unittest.skip("Not implemented")
def test_sjoin_outer(self):
Expand Down

0 comments on commit a1988eb

Please sign in to comment.