Skip to content

Instantly share code, notes, and snippets.

@bluenex
Last active February 19, 2019 01:03
Show Gist options
  • Save bluenex/8966b816b02fd3dfea88d50dda30fa12 to your computer and use it in GitHub Desktop.
Save bluenex/8966b816b02fd3dfea88d50dda30fa12 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Possibly wrong typos"
]
},
{
"cell_type": "code",
"execution_count": 62,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"---- All ranks in the Siamensis SI ----\n",
"\n",
"['Phylum', 'Kingdom', 'Domain', 'Species', 'Genus', 'Family', 'Order', 'Class', 'Suborder', 'Infraorder', 'Subfamily', 'Subclass', 'Subgenus', 'Subtribe', 'Tribe', 'Superfamily', 'Subspecies', 'Subpecies', 'Gunus', 'Speceis', 'Incertae', 'infraorder', 'Legion', 'Cohort', 'Specie', 'species', 'Sublegion', 'Subdivision', 'Superorder', 'Division', 'Infraclass', 'Achatina', 'Cryptozona', 'Hemiplecta', 'Sub', 'Panicum', 'Zingiber', 'Tamarindus', 'Life']\n"
]
},
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>author</th>\n",
" <th>id</th>\n",
" <th>rank</th>\n",
" <th>title</th>\n",
" <th>link</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>633</th>\n",
" <td>france</td>\n",
" <td>40273</td>\n",
" <td>Subpecies</td>\n",
" <td>Dorcus (Serrognathus) reichei reichei</td>\n",
" <td>http://www.siamensis.org/species_index?nid=40273#40273</td>\n",
" </tr>\n",
" <tr>\n",
" <th>805</th>\n",
" <td>iDuang</td>\n",
" <td>6996</td>\n",
" <td>Gunus</td>\n",
" <td>Cheirotonus</td>\n",
" <td>http://www.siamensis.org/species_index?nid=6996#6996</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1153</th>\n",
" <td>กวิวัฏ</td>\n",
" <td>1357</td>\n",
" <td>Speceis</td>\n",
" <td>Xyleutes ceramica Walker 1865</td>\n",
" <td>http://www.siamensis.org/species_index?nid=1357#1357</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1154</th>\n",
" <td>กวิวัฏ</td>\n",
" <td>1349</td>\n",
" <td>Speceis</td>\n",
" <td>Xyleutes mineus Cramer 1777</td>\n",
" <td>http://www.siamensis.org/species_index?nid=1349#1349</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1155</th>\n",
" <td>กวิวัฏ</td>\n",
" <td>1356</td>\n",
" <td>Speceis</td>\n",
" <td>Xyleutes persona</td>\n",
" <td>http://www.siamensis.org/species_index?nid=1356#1356</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1156</th>\n",
" <td>กวิวัฏ</td>\n",
" <td>1348</td>\n",
" <td>Speceis</td>\n",
" <td>Xyleutes strix (Linnaeus, 1758)</td>\n",
" <td>http://www.siamensis.org/species_index?nid=1348#1348</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1949</th>\n",
" <td>Due_n</td>\n",
" <td>1068</td>\n",
" <td>Incertae</td>\n",
" <td>Sedis</td>\n",
" <td>http://www.siamensis.org/species_index?nid=1068#1068</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3184</th>\n",
" <td>Bat _Hawk</td>\n",
" <td>8152</td>\n",
" <td>species</td>\n",
" <td>Macronus ptilosus</td>\n",
" <td>http://www.siamensis.org/species_index?nid=8152#8152</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4633</th>\n",
" <td>Mb.</td>\n",
" <td>5375</td>\n",
" <td>species</td>\n",
" <td>Pomacanthus annularis</td>\n",
" <td>http://www.siamensis.org/species_index?nid=5375#5375</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5569</th>\n",
" <td>หอยทากชรา</td>\n",
" <td>5783</td>\n",
" <td>Achatina</td>\n",
" <td>fulica</td>\n",
" <td>http://www.siamensis.org/species_index?nid=5783#5783</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5572</th>\n",
" <td>หอยทากชรา</td>\n",
" <td>5777</td>\n",
" <td>Cryptozona</td>\n",
" <td>siamensis</td>\n",
" <td>http://www.siamensis.org/species_index?nid=5777#5777</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5574</th>\n",
" <td>หอยทากชรา</td>\n",
" <td>5779</td>\n",
" <td>Hemiplecta</td>\n",
" <td>distincta</td>\n",
" <td>http://www.siamensis.org/species_index?nid=5779#5779</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5575</th>\n",
" <td>หอยทากชรา</td>\n",
" <td>5780</td>\n",
" <td>Hemiplecta</td>\n",
" <td>siamensis</td>\n",
" <td>http://www.siamensis.org/species_index?nid=5780#5780</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5845</th>\n",
" <td>kroolek</td>\n",
" <td>2555</td>\n",
" <td>Sub</td>\n",
" <td>Equisetidae</td>\n",
" <td>http://www.siamensis.org/species_index?nid=2555#2555</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5855</th>\n",
" <td>kroolek</td>\n",
" <td>2550</td>\n",
" <td>Sub</td>\n",
" <td>Isoetopsidae</td>\n",
" <td>http://www.siamensis.org/species_index?nid=2550#2550</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5865</th>\n",
" <td>kroolek</td>\n",
" <td>2547</td>\n",
" <td>Sub</td>\n",
" <td>Lycopodinae</td>\n",
" <td>http://www.siamensis.org/species_index?nid=2547#2547</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5876</th>\n",
" <td>kroolek</td>\n",
" <td>2548</td>\n",
" <td>Sub</td>\n",
" <td>Selaginellidae</td>\n",
" <td>http://www.siamensis.org/species_index?nid=2548#2548</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6014</th>\n",
" <td>lepton</td>\n",
" <td>34867</td>\n",
" <td>Panicum</td>\n",
" <td>repens</td>\n",
" <td>http://www.siamensis.org/species_index?nid=34867#34867</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6092</th>\n",
" <td>callus</td>\n",
" <td>8304</td>\n",
" <td>species</td>\n",
" <td>Zingiber cornubracteatum sp. nov.</td>\n",
" <td>http://www.siamensis.org/species_index?nid=8304#8304</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6096</th>\n",
" <td>Viriya</td>\n",
" <td>41143</td>\n",
" <td>Zingiber</td>\n",
" <td>puberulum puberulum</td>\n",
" <td>http://www.siamensis.org/species_index?nid=41143#41143</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6104</th>\n",
" <td>Viriya</td>\n",
" <td>41140</td>\n",
" <td>Zingiber</td>\n",
" <td>wrayi halabala</td>\n",
" <td>http://www.siamensis.org/species_index?nid=41140#41140</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6105</th>\n",
" <td>Viriya</td>\n",
" <td>41137</td>\n",
" <td>Zingiber</td>\n",
" <td>wrayi wrayi</td>\n",
" <td>http://www.siamensis.org/species_index?nid=41137#41137</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6108</th>\n",
" <td>Viriya</td>\n",
" <td>41138</td>\n",
" <td>Zingiber</td>\n",
" <td>zerumbet cochinchinense</td>\n",
" <td>http://www.siamensis.org/species_index?nid=41138#41138</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6208</th>\n",
" <td>lepton</td>\n",
" <td>35450</td>\n",
" <td>Tamarindus</td>\n",
" <td>indica</td>\n",
" <td>http://www.siamensis.org/species_index?nid=35450#35450</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6346</th>\n",
" <td>kroolek</td>\n",
" <td>2519</td>\n",
" <td>Sub</td>\n",
" <td>Marattidae</td>\n",
" <td>http://www.siamensis.org/species_index?nid=2519#2519</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6461</th>\n",
" <td>kroolek</td>\n",
" <td>2520</td>\n",
" <td>Sub</td>\n",
" <td>Polypididae</td>\n",
" <td>http://www.siamensis.org/species_index?nid=2520#2520</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6490</th>\n",
" <td>kroolek</td>\n",
" <td>2518</td>\n",
" <td>Sub</td>\n",
" <td>Ophioglossidae</td>\n",
" <td>http://www.siamensis.org/species_index?nid=2518#2518</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6495</th>\n",
" <td>kroolek</td>\n",
" <td>2517</td>\n",
" <td>Sub</td>\n",
" <td>Psilotidae</td>\n",
" <td>http://www.siamensis.org/species_index?nid=2517#2517</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" author id rank title \\\n",
"633 france 40273 Subpecies Dorcus (Serrognathus) reichei reichei \n",
"805 iDuang 6996 Gunus Cheirotonus \n",
"1153 กวิวัฏ 1357 Speceis Xyleutes ceramica Walker 1865 \n",
"1154 กวิวัฏ 1349 Speceis Xyleutes mineus Cramer 1777 \n",
"1155 กวิวัฏ 1356 Speceis Xyleutes persona \n",
"1156 กวิวัฏ 1348 Speceis Xyleutes strix (Linnaeus, 1758) \n",
"1949 Due_n 1068 Incertae Sedis \n",
"3184 Bat _Hawk 8152 species Macronus ptilosus \n",
"4633 Mb. 5375 species Pomacanthus annularis \n",
"5569 หอยทากชรา 5783 Achatina fulica \n",
"5572 หอยทากชรา 5777 Cryptozona siamensis \n",
"5574 หอยทากชรา 5779 Hemiplecta distincta \n",
"5575 หอยทากชรา 5780 Hemiplecta siamensis \n",
"5845 kroolek 2555 Sub Equisetidae \n",
"5855 kroolek 2550 Sub Isoetopsidae \n",
"5865 kroolek 2547 Sub Lycopodinae \n",
"5876 kroolek 2548 Sub Selaginellidae \n",
"6014 lepton 34867 Panicum repens \n",
"6092 callus 8304 species Zingiber cornubracteatum sp. nov. \n",
"6096 Viriya 41143 Zingiber puberulum puberulum \n",
"6104 Viriya 41140 Zingiber wrayi halabala \n",
"6105 Viriya 41137 Zingiber wrayi wrayi \n",
"6108 Viriya 41138 Zingiber zerumbet cochinchinense \n",
"6208 lepton 35450 Tamarindus indica \n",
"6346 kroolek 2519 Sub Marattidae \n",
"6461 kroolek 2520 Sub Polypididae \n",
"6490 kroolek 2518 Sub Ophioglossidae \n",
"6495 kroolek 2517 Sub Psilotidae \n",
"\n",
" link \n",
"633 http://www.siamensis.org/species_index?nid=40273#40273 \n",
"805 http://www.siamensis.org/species_index?nid=6996#6996 \n",
"1153 http://www.siamensis.org/species_index?nid=1357#1357 \n",
"1154 http://www.siamensis.org/species_index?nid=1349#1349 \n",
"1155 http://www.siamensis.org/species_index?nid=1356#1356 \n",
"1156 http://www.siamensis.org/species_index?nid=1348#1348 \n",
"1949 http://www.siamensis.org/species_index?nid=1068#1068 \n",
"3184 http://www.siamensis.org/species_index?nid=8152#8152 \n",
"4633 http://www.siamensis.org/species_index?nid=5375#5375 \n",
"5569 http://www.siamensis.org/species_index?nid=5783#5783 \n",
"5572 http://www.siamensis.org/species_index?nid=5777#5777 \n",
"5574 http://www.siamensis.org/species_index?nid=5779#5779 \n",
"5575 http://www.siamensis.org/species_index?nid=5780#5780 \n",
"5845 http://www.siamensis.org/species_index?nid=2555#2555 \n",
"5855 http://www.siamensis.org/species_index?nid=2550#2550 \n",
"5865 http://www.siamensis.org/species_index?nid=2547#2547 \n",
"5876 http://www.siamensis.org/species_index?nid=2548#2548 \n",
"6014 http://www.siamensis.org/species_index?nid=34867#34867 \n",
"6092 http://www.siamensis.org/species_index?nid=8304#8304 \n",
"6096 http://www.siamensis.org/species_index?nid=41143#41143 \n",
"6104 http://www.siamensis.org/species_index?nid=41140#41140 \n",
"6105 http://www.siamensis.org/species_index?nid=41137#41137 \n",
"6108 http://www.siamensis.org/species_index?nid=41138#41138 \n",
"6208 http://www.siamensis.org/species_index?nid=35450#35450 \n",
"6346 http://www.siamensis.org/species_index?nid=2519#2519 \n",
"6461 http://www.siamensis.org/species_index?nid=2520#2520 \n",
"6490 http://www.siamensis.org/species_index?nid=2518#2518 \n",
"6495 http://www.siamensis.org/species_index?nid=2517#2517 "
]
},
"execution_count": 62,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"print('---- All ranks in the Siamensis SI ----\\n')\n",
"print(list(si_df['rank'].unique()))\n",
"\n",
"# my suspect \n",
"w_ranks = ['Achatina', 'Cryptozona', 'Gunus', 'Hemiplecta',\n",
" 'Incertae', 'Panicum', 'Speceis', 'Sub', 'Subpecies',\n",
" 'Tamarindus', 'Zingiber', 'species']\n",
"\n",
"# 'http://www.siamensis.org/species_index?nid=t#t'\n",
"\n",
"# add link to page\n",
"typo_df = si_df[si_df['rank'].isin(w_ranks)][['author', 'id', 'rank', 'title']]\n",
"link_col = 'http://www.siamensis.org/species_index?nid='+typo_df['id'].astype(str)+'#'+typo_df['id'].astype(str)\n",
"typo_df = typo_df.assign(link=link_col)\n",
"# not truncate the cell\n",
"pd.set_option('display.max_colwidth', -1)\n",
"\n",
"# show\n",
"typo_df"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.2"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment