dask_geopandas.GeoSeries#

class dask_geopandas.GeoSeries(dsk, name, meta, divisions, spatial_partitions=None)#

Parallel GeoPandas GeoSeries

Do not use this class directly. Instead use functions like dask_geopandas.read_parquet(),or dask_geopandas.from_geopandas().

__init__(dsk, name, meta, divisions, spatial_partitions=None)#

Methods

__init__(dsk, name, meta, divisions[, ...])

abs()

Return a Series/DataFrame with absolute numeric value of each element.

add(other[, level, fill_value, axis])

Return Addition of series and other, element-wise (binary operator add).

add_prefix(prefix)

Prefix labels with string prefix.

add_suffix(suffix)

Suffix labels with string suffix.

affine_transform(matrix)

Return a GeoSeries with translated geometries.

align(other[, join, axis, fill_value])

Align two objects on their axes with the specified join method.

all([axis, skipna, split_every, out])

Return whether all elements are True, potentially over an axis.

any([axis, skipna, split_every, out])

Return whether any element is True, potentially over an axis.

append(other[, interleave_partitions])

Concatenate two or more Series.

apply(func[, convert_dtype, meta, args])

Parallel version of pandas.Series.apply

astype(dtype)

Cast a pandas object to a specified dtype dtype.

autocorr([lag, split_every])

Compute the lag-N autocorrelation.

between(left, right[, inclusive])

Return boolean Series equivalent to left <= series <= right.

bfill([axis, limit])

Synonym for DataFrame.fillna() with method='bfill'.

buffer(distance[, resolution])

Returns a GeoSeries of geometries representing all points within a given distance of each geometric object.

calculate_spatial_partitions()

Calculate spatial partitions

clear_divisions()

Forget division information

clip(mask[, keep_geom_type])

Clip points, lines, or polygon geometries to the mask extent.

clip_lower(threshold)

clip_upper(threshold)

combine(other, func[, fill_value])

Combine the Series with a Series or scalar according to func.

combine_first(other)

Update null elements with value in the same location in 'other'.

compute(**kwargs)

Compute this dask collection

contains(other, *args, **kwargs)

Returns a Series of dtype('bool') with value True for each aligned geometry that contains other.

copy()

Make a copy of the dataframe

corr(other[, method, min_periods, split_every])

Compute correlation with other Series, excluding missing values.

count([split_every])

Return number of non-NA/null observations in the Series.

cov(other[, min_periods, split_every])

Compute covariance with Series, excluding missing values.

covered_by(other, *args, **kwargs)

Returns a Series of dtype('bool') with value True for each aligned geometry that is entirely covered by other.

covers(other, *args, **kwargs)

Returns a Series of dtype('bool') with value True for each aligned geometry that is entirely covering other.

crosses(other, *args, **kwargs)

Returns a Series of dtype('bool') with value True for each aligned geometry that cross other.

cummax([axis, skipna, out])

Return cumulative maximum over a DataFrame or Series axis.

cummin([axis, skipna, out])

Return cumulative minimum over a DataFrame or Series axis.

cumprod([axis, skipna, dtype, out])

Return cumulative product over a DataFrame or Series axis.

cumsum([axis, skipna, dtype, out])

Return cumulative sum over a DataFrame or Series axis.

describe([split_every, percentiles, ...])

Generate descriptive statistics.

diff([periods, axis])

First discrete difference of element.

difference(other, *args, **kwargs)

Returns a GeoSeries of the points in each aligned geometry that are not in other.

disjoint(other, *args, **kwargs)

Returns a Series of dtype('bool') with value True for each aligned geometry disjoint to other.

distance(other, *args, **kwargs)

Returns a Series containing the distance to aligned other.

div(other[, level, fill_value, axis])

Return Floating division of series and other, element-wise (binary operator truediv).

divide(other[, level, fill_value, axis])

Return Floating division of series and other, element-wise (binary operator truediv).

dot(other[, meta])

Compute the dot product between the Series and the columns of other.

drop_duplicates([subset, split_every, ...])

Return DataFrame with duplicate rows removed.

dropna()

Return a new Series with missing values removed.

eq(other[, level, fill_value, axis])

Return Equal to of series and other, element-wise (binary operator eq).

explode()

Explode muti-part geometries into multiple single geometries.

ffill([axis, limit])

Synonym for DataFrame.fillna() with method='ffill'.

fillna([value, method, limit, axis])

Fill NA/NaN values using the specified method.

first(offset)

Select initial periods of time series data based on a date offset.

floordiv(other[, level, fill_value, axis])

Return Integer division of series and other, element-wise (binary operator floordiv).

ge(other[, level, fill_value, axis])

Return Greater than or equal to of series and other, element-wise (binary operator ge).

geohash([as_string, precision])

Calculate geohash based on the middle points of the geometry bounds for a given precision.

geom_almost_equals(other, *args, **kwargs)

Returns a Series of dtype('bool') with value True if each aligned geometry is approximately equal to other.

geom_equals(other, *args, **kwargs)

Returns a Series of dtype('bool') with value True for each aligned geometry equal to other.

geom_equals_exact(other, tolerance)

Return True for all geometries that equal aligned other to a given tolerance, else False.

get_partition(n)

Get a dask DataFrame/Series representing the nth partition.

groupby([by, group_keys, sort, observed, dropna])

Group Series using a mapper or by a Series of columns.

gt(other[, level, fill_value, axis])

Return Greater than of series and other, element-wise (binary operator gt).

head([n, npartitions, compute])

First n rows of the dataset

hilbert_distance([total_bounds, level])

Calculate the distance along a Hilbert curve.

idxmax([axis, skipna, split_every])

Return index of first occurrence of maximum over requested axis.

idxmin([axis, skipna, split_every])

Return index of first occurrence of minimum over requested axis.

interpolate(distance[, normalized])

Return a point at the specified distance along each geometry

intersection(other, *args, **kwargs)

Returns a GeoSeries of the intersection of points in each aligned geometry with other.

intersects(other, *args, **kwargs)

Returns a Series of dtype('bool') with value True for each aligned geometry that intersects other.

isin(values)

Whether elements in Series are contained in values.

isna()

Detect missing values.

isnull()

Detect missing values.

iteritems()

Lazily iterate over (index, value) tuples.

kurtosis([axis, fisher, bias, nan_policy, ...])

Return unbiased kurtosis over requested axis.

last(offset)

Select final periods of time series data based on a date offset.

le(other[, level, fill_value, axis])

Return Less than or equal to of series and other, element-wise (binary operator le).

lt(other[, level, fill_value, axis])

Return Less than of series and other, element-wise (binary operator lt).

map(arg[, na_action, meta])

Map values of Series according to input correspondence.

map_overlap(func, before, after, *args, **kwargs)

Apply a function to each partition, sharing rows with adjacent partitions.

map_partitions(func, *args, **kwargs)

Apply Python function on each DataFrame partition.

mask(cond[, other])

Replace values where the condition is True.

max([axis, skipna, split_every, out, ...])

Return the maximum of the values over the requested axis.

mean([axis, skipna, split_every, dtype, ...])

Return the mean of the values over the requested axis.

memory_usage([index, deep])

Return the memory usage of the Series.

memory_usage_per_partition([index, deep])

Return the memory usage of each partition

min([axis, skipna, split_every, out, ...])

Return the minimum of the values over the requested axis.

mod(other[, level, fill_value, axis])

Return Modulo of series and other, element-wise (binary operator mod).

mode([dropna, split_every])

Return the mode(s) of the Series.

morton_distance([total_bounds, level])

Calculate the distance of geometries along the Morton curve

mul(other[, level, fill_value, axis])

Return Multiplication of series and other, element-wise (binary operator mul).

ne(other[, level, fill_value, axis])

Return Not equal to of series and other, element-wise (binary operator ne).

nlargest([n, split_every])

Return the largest n elements.

notnull()

Detect existing (non-missing) values.

nsmallest([n, split_every])

Return the smallest n elements.

nunique([split_every, dropna])

Return number of unique elements in the object.

nunique_approx([split_every])

Approximate number of unique rows.

overlaps(other, *args, **kwargs)

Returns True for all aligned geometries that overlap other, else False.

persist(**kwargs)

Persist this dask collection into memory

pipe(func, *args, **kwargs)

Apply func(self, *args, **kwargs).

pow(other[, level, fill_value, axis])

Return Exponential power of series and other, element-wise (binary operator pow).

prod([axis, skipna, split_every, dtype, ...])

Return the product of the values over the requested axis.

product([axis, skipna, split_every, dtype, ...])

Return the product of the values over the requested axis.

project(other, *args, **kwargs)

Return the distance along each geometry nearest to other

quantile([q, method])

Approximate quantiles of Series

radd(other[, level, fill_value, axis])

Return Addition of series and other, element-wise (binary operator radd).

random_split(frac[, random_state, shuffle])

Pseudorandomly split dataframe into different pieces row-wise

rdiv(other[, level, fill_value, axis])

Return Floating division of series and other, element-wise (binary operator rtruediv).

reduction(chunk[, aggregate, combine, meta, ...])

Generic row-wise reductions.

relate(other, *args, **kwargs)

Returns the DE-9IM intersection matrices for the geometries

rename([index, inplace, sorted_index])

Alter Series index labels or name

repartition([divisions, npartitions, ...])

Repartition dataframe along new divisions

replace([to_replace, value, regex])

Replace values given in to_replace with value.

representative_point()

Returns a GeoSeries of (cheaply computed) points that are guaranteed to be within each geometry.

resample(rule[, closed, label])

Resample time-series data.

reset_index([drop])

Reset the index to the default index.

rfloordiv(other[, level, fill_value, axis])

Return Integer division of series and other, element-wise (binary operator rfloordiv).

rmod(other[, level, fill_value, axis])

Return Modulo of series and other, element-wise (binary operator rmod).

rmul(other[, level, fill_value, axis])

Return Multiplication of series and other, element-wise (binary operator rmul).

rolling(window[, min_periods, center, ...])

Provides rolling transformations.

rotate(angle[, origin, use_radians])

Returns a GeoSeries with rotated geometries.

round([decimals])

Round each value in a Series to the given number of decimals.

rpow(other[, level, fill_value, axis])

Return Exponential power of series and other, element-wise (binary operator rpow).

rsub(other[, level, fill_value, axis])

Return Subtraction of series and other, element-wise (binary operator rsub).

rtruediv(other[, level, fill_value, axis])

Return Floating division of series and other, element-wise (binary operator rtruediv).

sample([n, frac, replace, random_state])

Random sample of items

scale([xfact, yfact, zfact, origin])

Returns a GeoSeries with scaled geometries.

sem([axis, skipna, ddof, split_every, ...])

Return unbiased standard error of the mean over requested axis.

set_crs(value[, allow_override])

Set the Coordinate Reference System (CRS) of a GeoSeries.

shift([periods, freq, axis])

Shift index by desired number of periods with an optional time freq.

shuffle(on[, npartitions, max_branch, ...])

Rearrange DataFrame into new partitions

simplify(*args, **kwargs)

Returns a GeoSeries containing a simplified representation of each geometry.

skew([xs, ys, origin, use_radians])

Returns a GeoSeries with skewed geometries.

squeeze()

Squeeze 1 dimensional axis objects into scalars.

std([axis, skipna, ddof, split_every, ...])

Return sample standard deviation over requested axis.

sub(other[, level, fill_value, axis])

Return Subtraction of series and other, element-wise (binary operator sub).

sum([axis, skipna, split_every, dtype, out, ...])

Return the sum of the values over the requested axis.

symmetric_difference(other, *args, **kwargs)

Returns a GeoSeries of the symmetric difference of points in each aligned geometry with other.

tail([n, compute])

Last n rows of the dataset

to_bag([index, format])

Create a Dask Bag from a Series

to_crs([crs, epsg])

Returns a GeoSeries with all geometries transformed to a new coordinate reference system.

to_csv(filename, **kwargs)

Store Dask DataFrame to CSV files

to_dask_array([lengths, meta])

Convert a dask DataFrame to a dask array.

to_dask_dataframe()

Create a dask.dataframe object from a dask_geopandas object

to_delayed([optimize_graph])

Convert into a list of dask.delayed objects, one per partition.

to_frame([name])

Convert Series to DataFrame.

to_hdf(path_or_buf, key[, mode, append])

Store Dask Dataframe to Hierarchical Data Format (HDF) files

to_json(filename, *args, **kwargs)

See dd.to_json docstring for more information

to_sql(name, uri[, schema, if_exists, ...])

See dd.to_sql docstring for more information

to_string([max_rows])

Render a string representation of the Series.

to_timestamp([freq, how, axis])

Cast to DatetimeIndex of timestamps, at beginning of period.

to_wkb([hex])

Encode all geometry columns in the GeoDataFrame to WKB.

to_wkt(**kwargs)

Encode all geometry columns in the GeoDataFrame to WKT.

touches(other, *args, **kwargs)

Returns a Series of dtype('bool') with value True for each aligned geometry that touches other.

translate([xoff, yoff, zoff])

Returns a GeoSeries with translated geometries.

truediv(other[, level, fill_value, axis])

Return Floating division of series and other, element-wise (binary operator truediv).

union(other, *args, **kwargs)

Returns a GeoSeries of the union of points in each aligned geometry with other.

unique([split_every, split_out])

Return Series of unique values in the object.

value_counts([sort, ascending, dropna, ...])

Return a Series containing counts of unique values.

var([axis, skipna, ddof, split_every, ...])

Return unbiased variance over requested axis.

view(dtype)

Create a new view of the Series.

visualize([filename, format, optimize_graph])

Render the computation of this object's task graph using graphviz.

where(cond[, other])

Replace values where the condition is False.

within(other, *args, **kwargs)

Returns a Series of dtype('bool') with value True for each aligned geometry that is within other.

Attributes

area

Returns a Series containing the area of each geometry in the GeoSeries expressed in the units of the CRS.

attrs

Dictionary of global attributes of this dataset.

axes

boundary

Returns a GeoSeries of lower dimensional objects representing each geometries's set-theoretic boundary.

bounds

Returns a DataFrame with columns minx, miny, maxx, maxy values containing the bounds for each geometry.

cat

centroid

Returns a GeoSeries of points representing the centroid of each geometry.

convex_hull

Returns a GeoSeries of geometries representing the convex hull of each geometry.

crs

The Coordinate Reference System (CRS) represented as a pyproj.CRS object.

cx

Coordinate based indexer to select by intersection with bounding box.

divisions

Tuple of npartitions + 1 values, in ascending order, marking the lower/upper bounds of each partition's index.

dt

Namespace of datetime methods

dtype

Return data type

envelope

Returns a GeoSeries of geometries representing the envelope of each geometry.

exterior

Returns a GeoSeries of LinearRings representing the outer boundary of each polygon in the GeoSeries.

geom_type

Returns a Series of strings specifying the Geometry Type of each object.

geometry

has_z

Returns a Series of dtype('bool') with value True for features that have a z-component.

index

Return dask Index instance

interiors

Returns a Series of List representing the inner rings of each polygon in the GeoSeries.

is_empty

Returns a Series of dtype('bool') with value True for empty geometries.

is_monotonic

Return boolean if values in the object are monotonic_increasing.

is_monotonic_decreasing

Return boolean if values in the object are monotonic_decreasing.

is_monotonic_increasing

Alias for is_monotonic.

is_ring

Returns a Series of dtype('bool') with value True for features that are closed.

is_simple

Returns a Series of dtype('bool') with value True for geometries that do not cross themselves.

is_valid

Returns a Series of dtype('bool') with value True for geometries that are valid.

known_divisions

Whether divisions are already known

length

Returns a Series containing the length of each geometry expressed in the units of the CRS.

loc

Purely label-location based indexer for selection by label.

name

nbytes

Number of bytes

ndim

Return dimensionality

npartitions

Return number of partitions

partitions

Slice dataframe by partitions

shape

Return a tuple representing the dimensionality of a Series.

sindex

Need to figure out how to concatenate spatial indexes

size

Size of the Series or DataFrame as a Delayed object.

spatial_partitions

The spatial extent of each of the partitions of the dask GeoDataFrame.

str

Namespace for string methods

total_bounds

Returns a tuple containing minx, miny, maxx, maxy values for the bounds of the series as a whole.

type

Return the geometry type of each geometry in the GeoSeries

unary_union

Returns a geometry containing the union of all geometries in the GeoSeries.

values

Return a dask.array of the values of this dataframe

x

Return the x location of point geometries in a GeoSeries

y

Return the y location of point geometries in a GeoSeries

z

Return the z location of point geometries in a GeoSeries