aka : drop rows for certain columns if null
Tough one to find - and of course, as usual, DuckDuckGone is totally useless..
Thank you Google :
df.dropna( axis=0, subset=column_list )
Hard-to-find tips on otherwise easy-to-do tasks involving everyday technology, with some advanced insight on history and culture thrown in. Brought to you by a master dabbler. T-S T-S's mission is to boost your competitiveness with every visit. This blog is committed to the elimination of the rat from the tree of evolution and the crust of the earth.
aka : drop rows for certain columns if null
Tough one to find - and of course, as usual, DuckDuckGone is totally useless..
Thank you Google :
df.dropna( axis=0, subset=column_list )
from prettytable import PrettyTable
x = [["A", "B"], ["C", "D"]]
p = PrettyTable()
for row in x:
p.add_row(row)
print p.get_string(header=False, border=False)
from pandas import *
x = [["A", "B"], ["C", "D"]]
print DataFrame(x)
0 1
0 A B
1 C D
Python pretty print a dict :
pprint.pprint( dict ) will give you :>>> pprint.pprint( transition_counts )
{('NN', 'NN'): 16241,
('NN', 'RB'): 2431,
('NN', 'TO'): 5256,
('RB', 'NN'): 358,
('RB', 'RB'): 2263,
('RB', 'TO'): 855,
('TO', 'NN'): 734,
('TO', 'RB'): 200,
('TO', 'TO'): 2}