@@ -1527,7 +1527,7 @@ describe("DataFrame", function () {
15271527
15281528
15291529 describe ( "dropNa" , function ( ) {
1530- it ( "drop NaNs along axis 1 " , function ( ) {
1530+ it ( "drop NaNs along axis 0 " , function ( ) {
15311531 const data = [ [ 0 , 2 , 4 ] ,
15321532 [ 360 , 180 , 360 ] ,
15331533 [ NaN , 180 , 360 ] ] ;
@@ -1536,56 +1536,56 @@ describe("DataFrame", function () {
15361536 const df_val = [ [ 2 , 4 ] ,
15371537 [ 180 , 360 ] ,
15381538 [ 180 , 360 ] ] ;
1539- assert . deepEqual ( df . dropNa ( 1 ) . values , df_val ) ;
1539+ assert . deepEqual ( df . dropNa ( 0 ) . values , df_val ) ;
15401540
15411541 } ) ;
1542- it ( "drop NaNs along axis 0 " , function ( ) {
1542+ it ( "drop NaNs along axis 1 " , function ( ) {
15431543 const data = [ [ 0 , 2 , 4 ] ,
15441544 [ 360 , 180 , 360 ] ,
15451545 [ NaN , 180 , 360 ] ] ;
15461546 const column = [ "A" , "B" , "C" ] ;
15471547 const df = new dfd . DataFrame ( data , { columns : column } ) ;
15481548 const df_val = [ [ 0 , 2 , 4 ] ,
15491549 [ 360 , 180 , 360 ] ] ;
1550- assert . deepEqual ( df . dropNa ( 0 ) . values , df_val ) ;
1550+ assert . deepEqual ( df . dropNa ( 1 ) . values , df_val ) ;
15511551
15521552 } ) ;
1553- it ( "drop NaNs along axis 0 " , function ( ) {
1553+ it ( "drop NaNs along axis 1 " , function ( ) {
15541554 const data = [ [ NaN , 1 , 2 , 3 ] , [ 3 , 4 , NaN , 9 ] , [ 5 , 6 , 7 , 8 ] ] ;
15551555 const column = [ "A" , "B" , "C" , "D" ] ;
15561556 const df = new dfd . DataFrame ( data , { columns : column } ) ;
15571557 const df_val = [ [ 5 , 6 , 7 , 8 ] ] ;
1558- assert . deepEqual ( df . dropNa ( 0 ) . values , df_val ) ;
1558+ assert . deepEqual ( df . dropNa ( 1 ) . values , df_val ) ;
15591559
15601560 } ) ;
1561- it ( "drop inplace at axis 1 , inplace false " , function ( ) {
1561+ it ( "drop inplace at axis 0 , inplace false " , function ( ) {
15621562 const data = [ [ NaN , 1 , 2 , 3 ] , [ 3 , 4 , NaN , 9 ] , [ 5 , 6 , 7 , 8 ] ] ;
15631563 const column = [ "A" , "B" , "C" , "D" ] ;
15641564 const df = new dfd . DataFrame ( data , { columns : column } ) ;
15651565
15661566 const df_val = [ [ 1 , 3 ] , [ 4 , 9 ] , [ 6 , 8 ] ] ;
15671567
1568- assert . deepEqual ( df . dropNa ( 1 ) . values , df_val ) ;
1568+ assert . deepEqual ( df . dropNa ( 0 ) . values , df_val ) ;
15691569
15701570 } ) ;
1571- it ( "drop inplace at axis 1 , inplace true " , function ( ) {
1571+ it ( "drop inplace at axis 0 , inplace true " , function ( ) {
15721572 const data = [ [ NaN , 1 , 2 , 3 ] , [ 3 , 4 , NaN , 9 ] , [ 5 , 6 , 7 , 8 ] ] ;
15731573 const column = [ "A" , "B" , "C" , "D" ] ;
15741574 const df = new dfd . DataFrame ( data , { columns : column } ) ;
15751575
15761576 const df_val = [ [ 1 , 3 ] , [ 4 , 9 ] , [ 6 , 8 ] ] ;
1577- df . dropNa ( 1 , { inplace : true } ) ;
1577+ df . dropNa ( 0 , { inplace : true } ) ;
15781578 assert . deepEqual ( df . values , df_val ) ;
15791579
15801580 } ) ;
1581- it ( "drop inplace at axis 0 at inplace true" , function ( ) {
1581+ it ( "drop inplace at axis 1 at inplace true" , function ( ) {
15821582 const data = [ [ NaN , 1 , 2 , 3 ] , [ 3 , 4 , NaN , 9 ] , [ 5 , 6 , 7 , 8 ] ] ;
15831583 const column = [ "A" , "B" , "C" , "D" ] ;
15841584 const df = new dfd . DataFrame ( data , { columns : column } ) ;
15851585
15861586 const df_val = [ [ 5 , 6 , 7 , 8 ] ] ;
15871587
1588- df . dropNa ( 0 , { inplace : true } ) ;
1588+ df . dropNa ( 1 , { inplace : true } ) ;
15891589 assert . deepEqual ( df . values , df_val ) ;
15901590
15911591 } ) ;
@@ -1597,7 +1597,7 @@ describe("DataFrame", function () {
15971597
15981598 let df_val = [ [ 5 , 6 , 7 , 8 ] ] ;
15991599
1600- df . dropNa ( 0 , { inplace : true } ) ;
1600+ df . dropNa ( 1 , { inplace : true } ) ;
16011601 assert . deepEqual ( df . values , df_val ) ;
16021602
16031603 } ) ;
0 commit comments