ass1: Is this enough for question 1?

This commit is contained in:
2022-02-17 19:28:59 +01:00
parent 1cb8623412
commit 0ab6e35d2b
2 changed files with 29 additions and 1 deletions

View File

@ -70,3 +70,17 @@ fig.savefig('/home/kvkempen/Documents/20212022Q3/Superconductivity/assignments/s
#fig.savefig('/home/kvkempen/Documents/20212022Q3/Superconductivity/assignments/sc_elements.pdf')
plt.close(fig)
##
print(df.corr())
##
# Now we split the data into groups.
elgr1 = ['Nb', 'Tc', 'Pb', 'V', 'Ta', 'Sn', 'In', 'Tl', 'Pa', 'Ga', 'Th', 'Re', 'Al', 'Mn', 'Mo', 'Zn', 'Be', 'Rn', 'Cd']
elgr2 = ['W', 'Li', 'Ru', 'U', 'Hf', 'Ti', 'Zr', 'Lu', 'Am', 'Hg', 'La']
gr1 = df[df['element'].isin(elgr1)]
gr2 = df[df['element'].isin(elgr2)]
print(gr1.corr(), '\n', gr2.corr())