jtablesaw / tablesaw

Java dataframe and visualization library
https://jtablesaw.github.io/tablesaw/
Apache License 2.0
3.52k stars 637 forks source link

Adding a signature to dropRows function #203

Closed adriens closed 6 years ago

adriens commented 6 years ago

Description

Hi, in 0.10.00, we had the following signature

dropRows(i)

that was dropping the i first rows.

Recently i was upgrading a project to your latest version : 0.11.00 (see https://github.com/adriens/schemacrawler-plugin-dashboard/issues/17)

A package has changed its name which has broken our build. But also, the singature has disappeared and has been replaced by

dropRows(i,j)

Feature Request

Restore the

dropRows(i)

which in fact (if i do understand it the right way) could be done this way :

dropRows(i) <- dropRows(0,i)

in my case, i only wanted to drop the first line, hence i do now have to code this :

sortedScore = sortedScore.dropRows(0,0);

while i could do before :

sortedScore = sortedScore.dropRows(0);

...it was easier to read.

What's your opinion about that please ?

benmccann commented 6 years ago

For reference, changed here: https://github.com/jtablesaw/tablesaw/commit/cc72afd6a19265194ac7d7a2cd48b8ddc0a070f5

What if we added a method dropRow(int row)? Would that work for you?

adriens commented 6 years ago

For sure, dropRow(int row) would do the trick, of course ! :smile_cat:

benmccann commented 6 years ago

Ok. Fixed in 0.11.2