Lisp-Stat / data-frame

Data frames for Common Lisp
https://lisp-stat.github.io/data-frame
Microsoft Public License
27 stars 4 forks source link

Single row dataframe bug: SIMPLE-ERROR: Stop must be greater than start. #20

Open hauter opened 1 year ago

hauter commented 1 year ago

image

snunez1 commented 1 year ago

Congratulations, you've found a bug. We need to handle the edge case of a column of length 1. This section of code, that uses linspace is responsible for generating the row numbers, so if you print without row numbers you should be good. We'll have handle this case specially.

Out of interest, do you actually have a situation where this occurs, or were you just experimenting?

hauter commented 1 year ago

Thanks for you replay.

do you actually have a situation where this occurs, or were you just experimenting?

I have been learning CL for a couple of days, and I'm going to replace my own jupyter developer tools from python to CL.

I'm not a data scientist, but sometime I also need to deal some simple data works, so I need a library with data frame support like python pandas .

Today I tried several libraries but I don't think they are good enough until I saw lisp-stat, maybe because of the beautiful web page.

Hope the lisp-stat could be more stabile, and forgive my bad English.


And I guess I found another bug, here is my case:

image

image

The first column cannot be removed from the dataframe read from csv file.

snunez1 commented 1 year ago

I see. I think it's great that you're learning Common Lisp with Lisp-Stat. Lisp-Stat is stable enough to be used for analysis, but the edge cases aren't well covered in the test suites. For example removing all the columns of a data-frame isn't something that you normally see in practice because that would leave you no data to work with! You can remove one column though: (remove-columns *df1* '(name)) works. The examples in the IPS (Introduction to the Practice of Statistics) repo might be helpful if you're looking to use JupyterLab for your analysis.

However, I'm glad you're testing these things! We'll fix everything you find. Would you mind opening up a new issue for this latest bug?

hauter commented 1 year ago

OK, the new issue: https://github.com/Lisp-Stat/data-frame/issues/21