We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2743ce7 + a40d80f commit 01596e4Copy full SHA for 01596e4
dataSources/ncbi/taxonomy/scripts/processing.py
@@ -171,6 +171,17 @@ def loadDF(dumpFile: DumpFile) -> pd.DataFrame:
171
172
df["nomenclatural_code"] = df["division_cde"].apply(lambda x: divisionMap[x])
173
174
+ def cleanAuthority(authority: str, scientificName: str) -> str:
175
+ if not isinstance(authority, str):
176
+ return str(authority)
177
+
178
+ if not authority.startswith(scientificName):
179
+ return authority
180
181
+ return authority[len(scientificName):].strip(" ()")
182
183
+ df["authority"] = df.apply(lambda x: cleanAuthority(x["authority"], x["scientific name"]), axis=1)
184
185
df["taxonomic_status"] = ""
186
df["nomenclatural_act"] = "names usage"
187
df["ARGA_curated"] = False
0 commit comments