DOC: Fix minor typos in docstrings (#2203)

This commit is contained in:
Guillaume Lostis
2021-10-31 11:14:22 +00:00
committed by GitHub
parent 409d8f0a15
commit 020a9c4cb7
14 changed files with 23 additions and 23 deletions
@@ -60,7 +60,7 @@ Affine transformations
.. method:: GeoSeries.scale(self, xfact=1.0, yfact=1.0, zfact=1.0, origin='center')
Scale the geometries of the :class:`~geopandas.GeoSeries` along each (x, y, z) dimensio.
Scale the geometries of the :class:`~geopandas.GeoSeries` along each (x, y, z) dimension.
.. method:: GeoSeries.skew(self, angle, origin='center', use_radians=False)
+1 -1
View File
@@ -1182,7 +1182,7 @@ class GeometryArray(ExtensionArray):
Returns
-------
values : ndarray
An array suitable for factoraization. This should maintain order
An array suitable for factorization. This should maintain order
and be a supported dtype (Float64, Int64, UInt64, String, Object).
By default, the extension array is cast to object dtype.
na_value : object
+2 -2
View File
@@ -974,7 +974,7 @@ GeometryCollection
other : GeoSeries or geometric object
The GeoSeries (elementwise) or geometric object to compare to.
decimal : int
Decimal place presion used when testing for approximate equality.
Decimal place precision used when testing for approximate equality.
align : bool (default True)
If True, automatically aligns GeoSeries based on their indices.
If False, the order of elements is preserved.
@@ -1042,7 +1042,7 @@ GeometryCollection
other : GeoSeries or geometric object
The GeoSeries (elementwise) or geometric object to compare to.
tolerance : float
Decimal place presion used when testing for approximate equality.
Decimal place precision used when testing for approximate equality.
align : bool (default True)
If True, automatically aligns GeoSeries based on their indices.
If False, the order of elements is preserved.
+1 -1
View File
@@ -526,7 +526,7 @@ GON (((180.00000 -16.06713, 180.00000...
]
gdf = gdf.drop(columns=non_active_geoms)
# preprare tooltip and popup
# prepare tooltip and popup
if isinstance(gdf, geopandas.GeoDataFrame):
# add named index to the tooltip
if gdf.index.name is not None:
+3 -3
View File
@@ -1510,7 +1510,7 @@ individually so that features may have different properties
See also
--------
GeoDataFrame.explode : explode muti-part geometries into single geometries
GeoDataFrame.explode : explode multi-part geometries into single geometries
"""
@@ -1553,7 +1553,7 @@ individually so that features may have different properties
# overrides the pandas native explode method to break up features geometrically
def explode(self, column=None, ignore_index=False, index_parts=None, **kwargs):
"""
Explode muti-part geometries into multiple single geometries.
Explode multi-part geometries into multiple single geometries.
Each row containing a multi-part geometry will be split into
multiple rows with single geometries, thereby increasing the vertical
@@ -2041,7 +2041,7 @@ countries_w_city_data[countries_w_city_data["name_left"] == "Italy"]
Notes
-----
Since this join relies on distances, results will be innaccurate
Since this join relies on distances, results will be inaccurate
if your geometries are in a geographic CRS.
Every operation in GeoPandas is planar, i.e. the potential third
+2 -2
View File
@@ -26,7 +26,7 @@ def df_nybb():
@pytest.fixture()
def connection_postgis():
"""
Initiaties a connection to a postGIS database that must already exist.
Initiates a connection to a postGIS database that must already exist.
See create_postgis for more information.
"""
psycopg2 = pytest.importorskip("psycopg2")
@@ -51,7 +51,7 @@ def connection_postgis():
@pytest.fixture()
def engine_postgis():
"""
Initiaties a connection engine to a postGIS database that must already exist.
Initiates a connection engine to a postGIS database that must already exist.
"""
sqlalchemy = pytest.importorskip("sqlalchemy")
from sqlalchemy.engine.url import URL
+1 -1
View File
@@ -453,7 +453,7 @@ if compat.HAS_RTREE:
# handle empty / invalid geometries
if geometry is None:
# return an empty integer array, similar to pygeys.STRtree.query.
# return an empty integer array, similar to pygeos.STRtree.query.
return np.array([], dtype=np.intp)
if not isinstance(geometry, BaseGeometry):
+3 -3
View File
@@ -62,7 +62,7 @@ class TestExplore:
assert "openstreetmap" in m.to_dict()["children"].keys()
def test_map_settings_custom(self):
"""Check custom map settins"""
"""Check custom map settings"""
m = self.nybb.explore(
zoom_control=False,
width=200,
@@ -413,7 +413,7 @@ class TestExplore:
assert "BoroName" in out_str
def test_default_markers(self):
# check overriden default for points
# check overridden default for points
m = self.cities.explore()
strings = ['"radius":2', '"fill":true', "CircleMarker(latlng,opts)"]
out_str = self._fetch_map_string(m)
@@ -542,7 +542,7 @@ class TestExplore:
assert out_str.count("#5ec962ff") == 100
assert out_str.count("#fde725ff") == 100
# scale legend accorrdingly
# scale legend accordingly
m = self.world.explore(
"pop_est",
legend=True,
+1 -1
View File
@@ -293,7 +293,7 @@ class TestDtype(extension_tests.BaseDtypeTests):
class TestInterface(extension_tests.BaseInterfaceTests):
def test_array_interface(self, data):
# we are overriding this base test because the creation of `expected`
# potentionally doesn't work for shapely geometries
# potentially doesn't work for shapely geometries
# TODO can be removed with Shapely 2.0
result = np.array(data)
assert result[0] == data[0]
+1 -1
View File
@@ -412,7 +412,7 @@ def test_missing_values():
def test_isna_empty_geoseries():
# ensure that isna() result for emtpy GeoSeries has the correct bool dtype
# ensure that isna() result for empty GeoSeries has the correct bool dtype
s = GeoSeries([])
result = s.isna()
assert_series_equal(result, pd.Series([], dtype="bool"))
+2 -2
View File
@@ -88,7 +88,7 @@ def test_repr_empty():
def test_indexing(s, df):
# accessing scalar from the geometry (colunm)
# accessing scalar from the geometry (column)
exp = Point(1, 1)
assert s[1] == exp
assert s.loc[1] == exp
@@ -241,7 +241,7 @@ def test_astype(s, df):
res = df.astype({"value1": float})
assert isinstance(res, GeoDataFrame)
# check whether returned object is a datafrane
# check whether returned object is a dataframe
res = df.astype(str)
assert isinstance(res, pd.DataFrame) and not isinstance(res, GeoDataFrame)
+2 -2
View File
@@ -107,7 +107,7 @@ stria AUT 416600.0
"A non-default value for `predicate` was passed"
f' (got `predicate="{predicate}"`'
f' in combination with `op="{op}"`).'
" The value of `predicate` will be overriden by the value of `op`,"
" The value of `predicate` will be overridden by the value of `op`,"
" , which may result in unexpected behavior."
f"\n{deprecation_message}"
)
@@ -503,7 +503,7 @@ countries_w_city_data[countries_w_city_data["name_left"] == "Italy"]
Notes
-----
Since this join relies on distances, results will be innaccurate
Since this join relies on distances, results will be inaccurate
if your geometries are in a geographic CRS.
Every operation in GeoPandas is planar, i.e. the potential third
+1 -1
View File
@@ -137,7 +137,7 @@ class TestSpatialJoin:
if op != predicate:
warntype = UserWarning
match = (
"`predicate` will be overriden by the value of `op`"
"`predicate` will be overridden by the value of `op`"
+ r"(.|\s)*"
+ match
)
+2 -2
View File
@@ -836,7 +836,7 @@ def render_pep440_old(pieces):
The ".dev0" means dirty.
Eexceptions:
Exceptions:
1: no tags. 0.postDISTANCE[.dev0]
"""
if pieces["closest-tag"]:
@@ -1302,7 +1302,7 @@ def render_pep440_old(pieces):
The ".dev0" means dirty.
Eexceptions:
Exceptions:
1: no tags. 0.postDISTANCE[.dev0]
"""
if pieces["closest-tag"]: