Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CartoDataFrame returning GeoDataFrame when it shouldn't #1236

Closed
2 tasks done
alasarr opened this issue Nov 24, 2019 · 1 comment · Fixed by #1245
Closed
2 tasks done

CartoDataFrame returning GeoDataFrame when it shouldn't #1236

alasarr opened this issue Nov 24, 2019 · 1 comment · Fixed by #1245
Assignees
Labels

Comments

@alasarr
Copy link
Contributor

alasarr commented Nov 24, 2019

A couple of scenarios where

  • CRS transformation
from cartoframes import CartoDataFrame
from shapely.geometry import box
cdf = CartoDataFrame([{'id': 1, 'geometry': box(1, 1, 2, 2)}])
cdf.crs = 'epsg:4326'
type(cdf.to_crs('epsg:3857'))
# geopandas.geodataframe.GeoDataFrame
  • Filter
from cartoframes import CartoDataFrame
from shapely.geometry import box
cdf = CartoDataFrame([{'id': 1, 'geometry': box(1, 1, 2, 2)}])
cdf = cdf[cdf['id']>0]
type(cdf)
# geopandas.geodataframe.GeoDataFrame
@alasarr
Copy link
Contributor Author

alasarr commented Nov 24, 2019

Related with: #1130 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants