Questions tagged [pandas]
pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language.
265 questions
1
vote
1
answer
66
views
Read GeoPandas dataframe with gpd.from_postgis passing parameters to SQLAlchemy query
I'm trying to pass parameters to SQL query to be read with from_postgis function in order to get a geopandas dataframe from a PostGIS database.
from sqlalchemy import create_engine
from sqlalchemy ...
0
votes
1
answer
92
views
Why is my output is in Series after creating LineStrings from grouped ID?
I want to group the points by userid then create a LineString for each userid. Here's the GeoDataframe:
My goal is to store the results in a Geodataframe. Here's the code which I actually obtained ...
0
votes
2
answers
520
views
How to round or limit the number of decimals in geodataframe
I need to limit or round decimals in my GeoDataFrame so that when importing to a shapefile and opening a file in QGIS, the number of decimals remains the same as in the dataframe.
In GDF looks like: ...
0
votes
1
answer
544
views
How to return subtype and domain description instead of the code, when using arcgis.gis Python
I am working on some Python that takes an attribute table and makes a pandas df from it. I am doing this by creating an empty list, and looping through each record of the attribute table and making a ...
1
vote
1
answer
235
views
rio.to_raster returns ValueError: cannot convert float NaN to integer
Maybe this is more like a Pandas question but when I try to write an xarray to a raster using rio.to_raster() I get a ValueError in Python. If I don't convert the type of xarray to int16 (this is a ...
0
votes
1
answer
381
views
Overwriting hosted table in ArcGIS Online with CSV file from Pandas dataframe in Python
I have a script that I'm using to sort through a very large feature layer with thousands of records and create a summary table of them by type. It also calculates the count of records of the last 5 ...
1
vote
1
answer
83
views
Create filtered file out of overlapping coordinates
I have two CSV files with multiple columns of data (csv_1 and csv_2) which I have as Panda dataframes in Python as cal and pog. They both contain an 'x' and a 'y' column.
I want to make a new dataset ...
2
votes
2
answers
325
views
Colorizing polygons based on a user-defined color scheme determined by the column value
I have a shapefile, and the population density for each polygon is provided in a separate CSV file.I would like to assign colors to each polygon based on a user-defined color scheme determined by the ...
0
votes
1
answer
124
views
How to generate multi band raster map from CSV
I'm trying to generate a map from a CSV with percent land usages.
The CSV data looks something like the following:
Index x y l1 l2 l3 l4 l5 l6 l7 l8 l9 l10 l11 l12 l13 l14 l15 l16 l17 ...
0
votes
1
answer
144
views
Joining by attribute using Fuzzywuzzy module (Python Script)
I'm hoping to get some assistance of debugging my script using fuzzywuzzy attribute joins.
I have housing permit data that needs to be joined to parcel data. Unfortunately, the housing permit data is ...
0
votes
1
answer
218
views
Get geometry from a <geoprocessing describe geometry object object at 0x000001A9F576D120>
I am trying to use arcpy and pandas to build a line geometry from 2 point geometry columns in a pandas dataframe.
I create the dataframe by loading in the featureclass using the GeoAccessor
from ...
0
votes
1
answer
189
views
df.spatial.to_featureclass produces an empty shapefile [closed]
I am using ArcGIS Pro 2.9.8 and Python 3.7 from the ArcGIS\PRO\bin\Python\envs\arcgis-pro-py3\python.exe.
I have a pandas dataframe from CSV I am trying to get to a shapefile or featureclass for a set ...
1
vote
0
answers
69
views
rasterio.mask.mask returning strange values
I am using rasterio.mask.mask to extract values from a raster based on a polygon feature:
out_img, out_transform = mask(raster, feature, all_touched=True, crop=True, nodata=-999)
Mostly it works ...
1
vote
1
answer
222
views
Qgis Plugin DataPlotly (Ubuntu) : 'ModuleNotFoundError: No module named 'pandas'
I work with Qgis 3.34.0-Prizren on Ubuntu.
I would like test and use the qgis DataPlotly plugin.
I succeed in installing this plugin via the qgis plugin manager. But when i try to enable it still into ...
1
vote
1
answer
259
views
Merging a DataFrame with a GeoDataFrame based on two keys
I have a GeoDataFrame called gdf_points with a list of POINTs:
index
NAME
geometry
1
A
POINT(A)
2
B
POINT(B)
And another DataFrame called df_names in which each POINT is associated with possibly more ...