0
I’m trying to extract 15O lines from a 500-line dataset. So I’d like to do it on Andom.
My data
objeto,cor,label
cachorro,branco,animal
manga,laranja,fruta
calça,preta,roupa
My script
import pandas
import pandas as pd
df = pd.read_csv('produit_non_conforme.csv', sep = ',')
mails_random = df.sample(150)
print(mails_random)
But the result is very strange, I don’t have the complete line...
objeto ... label
277 uva ... fruta
116 urso ... animal
495 ... ... ...
It would be possible to have the complete line?
It’s not just a matter of the
print
hide column by space? Try doingprint(mails_random['cor'])
.– Pedro von Hertwig Batista
Unfortunately when I do this the print only prints that color column. And I need the three...
– marin
Try
print( pd.DataFrame(df, columns=['objeto', 'cor', 'label']) )
– AlexCiuffa
I think this link here: https://stackoverflow.com/questions/11707586/python-pandas-how-to-widen-output-display-to-see-more-columns Can you help
– Victor Capone