I'm working with a CSV file that comes down from a URL. I keep it and even there everything is perfect. Once I want to read it and print the results it just shows me some. He puts me some ... ... ... and tells me how many lines I have but he does not show me all:
Sitio valores1 valores2 Fill Rate
si.com 326014 3585 1.10
elcte.com 11333 121 1.07
youthage.co.za 19774 212 1.07
ginh.tv 44086 457 1.04
taianhdep.com 14149 147 1.04
... ... ... ...
boe.com.br 411299 868 0.21
jbsis.com 18436 38 0.21
rqueamo.com.br 17414 36 0.21
tats.com 13192 28 0.21
ho.vn 264321 558 0.21
nie.com.au 126480 264 0.21
[475 rows x 3 columns]
I leave the code here to see:
import pandas as pd
datos = pd.read_csv('data.csv', header=0, index_col=0)
auto = (datos.sort_values(by='Fill Rate', ascending=False))
auto2 = auto[(auto['Fill Rate'] >0.2)]
f = open("WL.csv", "w")
content2 = str(auto2)
f.write(content2)
f.close()
In the code what I do is read the csv, sort it by the last column and only show the highest values of 0.2. Use Python 2.7
Thank you very much