File tree Expand file tree Collapse file tree 1 file changed +39
-1
lines changed
Expand file tree Collapse file tree 1 file changed +39
-1
lines changed Original file line number Diff line number Diff line change 2929 "output_type" : " stream" ,
3030 "stream" : " stdout" ,
3131 "text" : [
32- " Sebastian Raschka 25 /01/2015 \n " ,
32+ " Sebastian Raschka 28 /01/2015 \n " ,
3333 " \n " ,
3434 " CPython 3.4.2\n " ,
3535 " IPython 2.3.1\n " ,
9090 " - [Changing Values in a Column](#Changing-Values-in-a-Column)\n " ,
9191 " - [Adding a New Column](#Adding-a-New-Column)\n " ,
9292 " - [Missing Values aka NaNs](#Missing-Values-aka-NaNs)\n " ,
93+ " - [Counting Rows with NaNs](#Counting-Rows-with-NaNs)\n " ,
9394 " - [Selecting NaN Rows](#Selecting-NaN-Rows)\n " ,
9495 " - [Selecting non-NaN Rows](#Selecting-non-NaN-Rows)\n " ,
9596 " - [Filling NaN Rows](#Filling-NaN-Rows)\n " ,
937938 " <br>"
938939 ]
939940 },
941+ {
942+ "cell_type" : " heading" ,
943+ "level" : 3 ,
944+ "metadata" : {},
945+ "source" : [
946+ " Counting Rows with NaNs"
947+ ]
948+ },
949+ {
950+ "cell_type" : " code" ,
951+ "collapsed" : false ,
952+ "input" : [
953+ " nans = df.shape[0] - df.dropna().shape[0]\n " ,
954+ " \n " ,
955+ " print('%d rows have missing values' % nans)"
956+ ],
957+ "language" : " python" ,
958+ "metadata" : {},
959+ "outputs" : [
960+ {
961+ "output_type" : " stream" ,
962+ "stream" : " stdout" ,
963+ "text" : [
964+ " 3 rows have missing values\n "
965+ ]
966+ }
967+ ],
968+ "prompt_number" : 8
969+ },
970+ {
971+ "cell_type" : " markdown" ,
972+ "metadata" : {},
973+ "source" : [
974+ " <br>\n " ,
975+ " <br>"
976+ ]
977+ },
940978 {
941979 "cell_type" : " heading" ,
942980 "level" : 3 ,
You can’t perform that action at this time.
0 commit comments