Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def separate_pacific(self):
if self._separate_pacific is None:
# need to fix the duplicates
df = self._df.copy()
df["V2"] = _enumerate_duplicates(df["V2"])
self._separate_pacific = from_geopandas(
df,
names="V2",
abbrevs="V3",
name=self._name + "(separate Pacific regions)",
source=self._source,
)
return self._separate_pacific
def all(self):
if self._all is None:
self._all = from_geopandas(
self._df,
names="Name",
abbrevs="Acronym",
name=self._name,
source=self._source,
)
return self._all
def all(self):
if self._all is None:
self._all = from_geopandas(
self._df_combined,
names="V2",
abbrevs="V3",
name=self._name,
source=self._source,
)
return self._all
def ocean(self):
if self._ocean is None:
ocean = self._df.Type.str.contains("Ocean")
self._ocean = from_geopandas(
self._df.loc[ocean],
names="Name",
abbrevs="Acronym",
name=self._name + " (ocean only)",
source=self._source,
)
return self._ocean
def land(self):
if self._land is None:
land = self._df.Type.str.contains("Land")
self._land = from_geopandas(
self._df.loc[land],
names="Name",
abbrevs="Acronym",
name=self._name + " (land only)",
source=self._source,
)
return self._land