This is not my strength and I am still learning.ĩ. I know there is a good deal more room for memory optimization. If I knew of a way to get the number of rows and columns of a csv without reading the whole file then I would. tidy-viewer reads the entire csv, but only parses the head. If you are interested I would happily take a contribution that allows users the option to configure tv with some dotfile. At this time I just have absolute presets. I want to eventually add the ability for users to make a config file will their own colors. In my view tables of data are data visualizations meaning that I don't have to show everything to understand enough of it. I would prefer to know that there is a lot of text that I can dig into latter, but when I am glancing at the csv I just want an overall picture. ![]() If there are cells with long text they get cut at 20 characters. The goal is to glance at the data as a whole not a cell or fields. The goal is to be a `column` replacement not a spreadsheet replacement. I made the choice early on to stay chose the more minimal path and stick to a cli. To offer scrolling the only option I am aware of is turning this cli into a tui. With github actions I auto-build binaries for many OSes. I also release binaries which I think makes this requirement less needed. Personally I like the choice to both explicitly render missing data in colour and to apply NA as a placeholder text to display that colour. Pandas in Python is stuck with NaN for numeric types (not quite correct) and "" or None for string types. > The norm of treating missing data as NA exists in R (which the developer of this is clearly inspired by based on the GitHub readme.). tv's purpose is to maximize viewer enjoyment. For this reason tv is much faster, but speed is not the goal of the package. When I do it on my machine it takes 15.228 seconds while tv takes 0.0042 seconds. csvlook reads and parses all of the data. The most important issue to me is that csvlook is a much less pleasant viewing experience, but there is also this. > How does tidy-viewer compare with csvlook? This means it cannot be used with large files without thrashing and even if your CSV does fit in global memory, it will still be kind of unusable, trying to dump gigabytes onto the terminal.īottom line: A nice initial effort, but the more serious challenges are yet to be tackled, plus needs to be more robustly cross-platform. tidy-viewer loads and parses the entire CSV immediately and, in fact, seems to keep two copies of it in memory at once. When the user doesn't specify the color scheme, are you choosing one based on the terminal colors, or are you using absolute color values? I suggest the former.Ĩ. tidy-viewer does not seem to support wrapping longer fields onto multiple terminal lines.ħ. less doesn't cut it, because it doesn't keep the header row, plus it doesn't recognize field widths.Ħ. What about scrolling? The worst part of viewing CSVs is having to handle wide ones which exceed the terminal width, and having decent horizontal as well as vertical scrolling ability. I realize this is a tall order, however.ĥ. ![]() It would be even more convenient if you could provide binaries with little or no extra dynamic library dependencies, which could be used on older / rustless systems. ![]() Many systems, especially older ones, especially ones which you access remotely and don't have root privileges on, won't have a rust installation. It would be nice if you could be compatible with older rust distributions/versions.Ĥ. tidy-viewer seems to require "unstable library features", or at least ones which were unstable as of Rust 1.48.0. I'm guessing maybe in your workflow you want to use that phrase a lot, but for a tool for the general public I'd not do this kind of interpretation and I would leave an empty field as empty.ģ. I don't understand why someone would expect a quoted string field whose raw characters are "n/a" should be rendered as anything other than n/a (i.e. The CSV spec, AFAIK, doesn't recognize this phrase. Looking at the demo video, there seems to be an odd fixation with "N/A". How does tidy-viewer compare with csvlook?Ģ. First of all - kudos on tackling this task - it is indeed very annoying to get CSVs to render nicely on a terminal.ġ.
0 Comments
Leave a Reply. |