Sharedpanda test.ipynbOpen in CoCalc
Jupyter notebook panda test.ipynb
import pandas as pd
from pylab import *
import pylab as pl
import matplotlib.pyplot as plt

%matplotlib inline
y = np.arange(400, 1710, 5)
x = np.arange(150, 222, 2).tolist()
d = pd.read_csv("GeUntap2D_150-220_ref.txt", sep='\t', header=None, names=x)
d.index = d.index*1000

d
WARNING: Some output was deleted.
#print d.type()
dsort = d.T.sort_index(ascending=False)
print (dsort)
400.277 405.280 410.284 415.287 420.291 425.294 430.298 \ 220 0.016825 0.016980 0.017237 0.017512 0.017637 0.017504 0.017126 218 0.016324 0.016482 0.016742 0.017027 0.017161 0.017045 0.016689 216 0.016004 0.016153 0.016403 0.016690 0.016830 0.016727 0.016399 214 0.015564 0.015712 0.015959 0.016259 0.016421 0.016331 0.016010 212 0.015283 0.015416 0.015645 0.015947 0.016138 0.016082 0.015782 210 0.014931 0.015055 0.015275 0.015577 0.015777 0.015735 0.015461 208 0.014622 0.014734 0.014939 0.015236 0.015457 0.015441 0.015177 206 0.014277 0.014390 0.014591 0.014887 0.015119 0.015121 0.014885 204 0.013911 0.014023 0.014215 0.014500 0.014748 0.014782 0.014565 202 0.013630 0.013718 0.013899 0.014185 0.014442 0.014478 0.014280 200 0.013298 0.013395 0.013577 0.013856 0.014119 0.014175 0.013986 198 0.012964 0.013055 0.013224 0.013488 0.013755 0.013833 0.013662 196 0.012642 0.012731 0.012896 0.013149 0.013413 0.013502 0.013355 194 0.012359 0.012441 0.012594 0.012835 0.013101 0.013212 0.013084 192 0.012090 0.012163 0.012311 0.012551 0.012822 0.012940 0.012815 190 0.011741 0.011820 0.011968 0.012205 0.012478 0.012613 0.012514 188 0.011414 0.011494 0.011640 0.011874 0.012148 0.012297 0.012224 186 0.011151 0.011218 0.011342 0.011551 0.011811 0.011978 0.011928 184 0.010848 0.010913 0.011028 0.011230 0.011492 0.011671 0.011634 182 0.010535 0.010606 0.010723 0.010927 0.011189 0.011379 0.011360 180 0.010169 0.010247 0.010363 0.010558 0.010803 0.010996 0.011003 178 0.009920 0.009996 0.010103 0.010285 0.010516 0.010717 0.010749 176 0.009523 0.009601 0.009706 0.009884 0.010109 0.010314 0.010363 174 0.009281 0.009356 0.009452 0.009621 0.009835 0.010040 0.010109 172 0.009036 0.009105 0.009191 0.009348 0.009553 0.009760 0.009855 170 0.008784 0.008844 0.008929 0.009081 0.009276 0.009482 0.009597 168 0.008511 0.008571 0.008646 0.008787 0.008972 0.009171 0.009304 166 0.008210 0.008276 0.008359 0.008502 0.008683 0.008885 0.009036 164 0.007935 0.008004 0.008089 0.008225 0.008402 0.008598 0.008765 162 0.007635 0.007706 0.007790 0.007919 0.008092 0.008279 0.008452 160 0.007433 0.007492 0.007576 0.007701 0.007864 0.008037 0.008216 158 0.007209 0.007267 0.007347 0.007464 0.007621 0.007787 0.007974 156 0.007006 0.007062 0.007140 0.007252 0.007400 0.007553 0.007742 154 0.006720 0.006761 0.006837 0.006954 0.007089 0.007245 0.007433 152 0.006442 0.006488 0.006569 0.006669 0.006815 0.006958 0.007152 150 0.006216 0.006271 0.006340 0.006444 0.006575 0.006716 0.006907 435.301 440.305 445.308 ... 1656.150 1661.150 1666.150 \ 220 0.016829 0.017445 0.013848 ... 0.000450 0.000438 0.000425 218 0.016387 0.016987 0.013518 ... 0.000404 0.000394 0.000392 216 0.016102 0.016675 0.013308 ... 0.000374 0.000373 0.000377 214 0.015728 0.016291 0.013014 ... 0.000376 0.000368 0.000355 212 0.015482 0.015979 0.013518 ... 0.000368 0.000359 0.000348 210 0.015175 0.015644 0.013334 ... 0.000326 0.000328 0.000336 208 0.014898 0.015349 0.013160 ... 0.000340 0.000335 0.000325 206 0.014617 0.015042 0.012994 ... 0.000303 0.000302 0.000307 204 0.014307 0.014727 0.012800 ... 0.000314 0.000308 0.000298 202 0.014040 0.014419 0.012636 ... 0.000297 0.000287 0.000280 200 0.013748 0.014180 0.012116 ... 0.000264 0.000273 0.000276 198 0.013428 0.013855 0.011859 ... 0.000263 0.000260 0.000253 196 0.013138 0.013548 0.011622 ... 0.000243 0.000236 0.000232 194 0.012874 0.013277 0.011415 ... 0.000221 0.000223 0.000231 192 0.012601 0.013019 0.010946 ... 0.000249 0.000241 0.000239 190 0.012327 0.012732 0.010786 ... 0.000231 0.000238 0.000246 188 0.012055 0.012436 0.010628 ... 0.000242 0.000245 0.000242 186 0.011765 0.012129 0.010444 ... 0.000233 0.000230 0.000223 184 0.011490 0.011841 0.010259 ... 0.000207 0.000215 0.000224 182 0.011229 0.011605 0.009858 ... 0.000207 0.000212 0.000211 180 0.010880 0.011245 0.009584 ... 0.000203 0.000198 0.000191 178 0.010640 0.010996 0.009395 ... 0.000181 0.000181 0.000185 176 0.010263 0.010610 0.009098 ... 0.000179 0.000185 0.000188 174 0.010029 0.010370 0.008917 ... 0.000170 0.000167 0.000168 172 0.009788 0.010085 0.009152 ... 0.000173 0.000176 0.000182 170 0.009550 0.009830 0.008988 ... 0.000171 0.000176 0.000180 168 0.009279 0.009550 0.008771 ... 0.000164 0.000166 0.000170 166 0.009035 0.009300 0.008623 ... 0.000164 0.000162 0.000162 164 0.008783 0.009060 0.008300 ... 0.000154 0.000151 0.000150 162 0.008482 0.008750 0.008039 ... 0.000148 0.000145 0.000144 160 0.008270 0.008535 0.007859 ... 0.000144 0.000141 0.000138 158 0.008051 0.008316 0.007679 ... 0.000140 0.000141 0.000139 156 0.007842 0.008097 0.007494 ... 0.000128 0.000135 0.000139 154 0.007543 0.007766 0.007526 ... 0.000143 0.000140 0.000137 152 0.007280 0.007521 0.007285 ... 0.000137 0.000134 0.000131 150 0.007052 0.007289 0.007117 ... 0.000126 0.000124 0.000124 1671.160 1676.160 1681.160 1686.170 1691.170 1696.170 1701.180 220 0.000415 0.000412 0.000415 0.000421 0.000426 0.000425 0.000418 218 0.000396 0.000404 0.000409 0.000408 0.000399 0.000388 0.000378 216 0.000384 0.000387 0.000384 0.000376 0.000366 0.000359 0.000358 214 0.000345 0.000341 0.000344 0.000353 0.000362 0.000365 0.000360 212 0.000341 0.000341 0.000347 0.000356 0.000361 0.000361 0.000355 210 0.000345 0.000349 0.000347 0.000339 0.000329 0.000324 0.000325 208 0.000315 0.000310 0.000313 0.000322 0.000332 0.000337 0.000336 206 0.000316 0.000323 0.000325 0.000320 0.000311 0.000304 0.000302 204 0.000291 0.000288 0.000293 0.000302 0.000311 0.000318 0.000317 202 0.000278 0.000284 0.000294 0.000303 0.000306 0.000303 0.000295 200 0.000271 0.000263 0.000255 0.000253 0.000258 0.000267 0.000276 198 0.000245 0.000243 0.000246 0.000255 0.000264 0.000269 0.000267 196 0.000235 0.000243 0.000253 0.000258 0.000257 0.000250 0.000243 194 0.000241 0.000247 0.000247 0.000241 0.000233 0.000228 0.000229 192 0.000242 0.000251 0.000259 0.000262 0.000259 0.000251 0.000244 190 0.000252 0.000253 0.000248 0.000241 0.000236 0.000237 0.000242 188 0.000234 0.000227 0.000225 0.000229 0.000237 0.000246 0.000251 186 0.000218 0.000218 0.000223 0.000231 0.000237 0.000239 0.000236 184 0.000228 0.000226 0.000220 0.000213 0.000209 0.000210 0.000216 182 0.000206 0.000199 0.000195 0.000196 0.000203 0.000211 0.000217 180 0.000187 0.000188 0.000194 0.000202 0.000208 0.000210 0.000207 178 0.000191 0.000196 0.000198 0.000195 0.000191 0.000187 0.000187 176 0.000186 0.000181 0.000177 0.000177 0.000181 0.000188 0.000193 174 0.000173 0.000178 0.000181 0.000180 0.000176 0.000173 0.000173 172 0.000187 0.000187 0.000184 0.000180 0.000179 0.000181 0.000187 170 0.000181 0.000178 0.000174 0.000173 0.000177 0.000182 0.000185 168 0.000172 0.000171 0.000168 0.000167 0.000169 0.000172 0.000175 166 0.000166 0.000169 0.000170 0.000168 0.000165 0.000166 0.000169 164 0.000152 0.000157 0.000160 0.000159 0.000156 0.000154 0.000156 162 0.000146 0.000150 0.000154 0.000154 0.000151 0.000149 0.000149 160 0.000138 0.000142 0.000147 0.000150 0.000149 0.000145 0.000142 158 0.000134 0.000132 0.000133 0.000138 0.000143 0.000146 0.000145 156 0.000139 0.000135 0.000130 0.000127 0.000128 0.000133 0.000139 154 0.000135 0.000135 0.000138 0.000142 0.000146 0.000148 0.000148 152 0.000129 0.000128 0.000131 0.000134 0.000139 0.000142 0.000143 150 0.000127 0.000131 0.000136 0.000138 0.000139 0.000137 0.000134 [36 rows x 261 columns]
%matplotlib inline
fig, ax = plt.subplots(figsize=(10, 6))

heatmap = imshow(dsort, interpolation='nearest', extent=[400.277, 1701.18, 150.0, 220.0])
plt.xlabel("Wavelength (nm)", fontsize=14, labelpad=10)
plt.ylabel("Diameter (nm)", fontsize=14, labelpad=10)

cbar = fig.colorbar(heatmap, pad=0.025)
cbar.set_label('Absorption',size=14, labelpad=10)
#colorbar(shrink=0.75, pad=0.01)
axis('tight')


(400.27699999999999, 1701.1800000000001, 150.0, 220.0)
!pip install -U -q PyDrive ## you will have install for every colab session
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8fb5e2b6a0>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pydrive/ Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8fb5e01eb8>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pydrive/ Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8fb5e01ba8>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pydrive/ Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8fb5e01cf8>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pydrive/ Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f8fb5e0fe10>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/pydrive/ Could not find a version that satisfies the requirement PyDrive (from versions: ) No matching distribution found for PyDrive