Last active
April 22, 2020 09:51
-
-
Save ddofer/59d0f583823096b878b01d9c05822ff2 to your computer and use it in GitHub Desktop.
Revisions
-
ddofer revised this gist
Apr 22, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,6 @@ df_base = pd.read_html("https://en.wikipedia.org/wiki/List_of_chemical_elements")[0] element_full_names = df_base["List of chemical elements"]["Element"][:-1] # last row is comments element_full_names =list(element_full_names.apply(lambda x: x[0],axis=1).values) # get individual names out of wrapped list format # element_full_names.to_csv("names_of_elements.csv",index=False) -
ddofer revised this gist
Apr 22, 2020 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,4 +4,6 @@ df_base = pd.read_html("https://en.wikipedia.org/wiki/List_of_chemical_elements")[0] element_full_names = df_base["List of chemical elements"]["Element"][:-1] # last row is comments element_full_names = element_full_names.apply(lambda x: x[0],axis=1).values # get names out of list format # element_full_names.to_csv("names_of_elements.csv",index=False) -
ddofer created this gist
Apr 22, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ import pandas as pd # read wikipedia html table with info on all elemetns, including symbols, names, properties: df_base = pd.read_html("https://en.wikipedia.org/wiki/List_of_chemical_elements")[0] element_full_names = df_base["List of chemical elements"]["Element"][:-1] # last row is comments element_full_names.to_csv("names_of_elements.csv",index=False)