Comments (8)
Hello. Welcome to Daru.
I am a Daru user. Yes, It's hard to use Daru on the terminal.
- You should use Jupyter Notebook/Lab if possible. Does IRuby not work well? Since iruby gem is old, it is better to install from github's master using
specific_install
.
- The width of the column shown on the terminal is specified here. All columns are the same width, not best fit. We need a contribution.
daru/lib/daru/formatters/table.rb
Lines 16 to 17 in d17887e
- Daru has no option settings. We need improvement.
#502
from daru.
-
It sounds like you are suggesting IRuby as a way to get notebook like output on the terminal. Is that the case?
-
I did find the Spacing and Threshold variables. Unfortunately, my values do vary widely in width. : )
I would be interested in contributing to this, I have briefly looked into the code for inspect. How would you envision I add a best fit printing function? It seems pretty_print is a missing method atm?
- Ah, so no way to set max_colwidth and forget?
from daru.
-
No, Column widths do not change with IRuby console/qtconsole. Sorry for my lack of explanation. I'm not a web developer. If you are working on rails, the following tools may be useful, (as you might have found).
-
I'm glad to hear that. Ping @Shekharrajak
-
I just forget column width on a terminal and use Jupyter Lab. But, it is clear that Daru should have option settings.
from daru.
Thanks for reporting the issue. You can see the examples in IRuby notebook here.
@reedjosh , do you want to see all the colums (or all the rows)?
I see that Pandas in Python shell and daru
in Ruby cell displays similar table structure.
[1] pry(main)> df = Daru::DataFrame.new([[1,2,3,4], [1,2,3,4]],order: [:a, :b], index: [:one, :two, :three, :four])
=> #<Daru::DataFrame(4x2)>
a b
one 1 1
two 2 2
three 3 3
four 4 4
>>> pd.DataFrame([[1,1], [2,2], [3,3], [4,4]], index=['one', 'two', 'three', 'four'], columns=['a','b'])
a b
one 1 1
two 2 2
three 3 3
four 4 4
from daru.
Pandas
- Column width is adjusted automatically.
sepal_length
is wide.species
is narrow.
Daru
- Column name only partially displayed.
Sepal.Leng
should beSepal.Length
.- All columns are the same width.
#<Daru::DataFrame(150x5)>
is informative, but looks busy (for me).
The data I usually see does not fits in column widths. For example
from daru.
Thanks @kojix2 for letting me know this point. Yes! It should be adjusted and have option for setting the max width of the all the columns.
from daru.
Yes, Pandas auto-adjusts width, and Pandas prints without first printing the object.
I use pandas to display data on the command line quite often.
For now, I've setup to use tj/terminal-table for my final output. It works well enough.
Should I get around to it, I will work on this, but I won't be able to do so anytime soon. Thanks all for the consideration and work you've done to build DARU. It's much nicer than manually manipulating data!! : )
from daru.
Thanks @reedjosh for letting us know. Surely table structure will be improved in near future.
from daru.
Related Issues (20)
- `add_vector` should not require name of named Vector. HOT 1
- Tidy data HOT 2
- Map method. Should Daru::Vector return an Array? HOT 3
- Vector#uniq fails on category vectors HOT 1
- Incostencies in behaviour of DataFrame. HOT 2
- Adding vector through direct assignment fails when DataFrame is empty
- Add way to generate DataFrame from active_record with aggregated fields HOT 3
- Suggestion: DataFrame to two-dimensional array HOT 4
- Offsets should be comparable [feature request]
- Daru::DateTimeIndexHelper unable to infer offsets that do not match a specifc Daru::DateTimeIndexHelper::TIME_INTERVALS
- set_index fails if data_frame size is zero
- Status of this Project? HOT 19
- from_csv via String HOT 2
- get_group unpredicted behaviour in case of Sorting applied HOT 2
- Github Bot to maintain / track the issues & open PRs
- Daru::DataFrame.from_csv ArgumentError: wrong number of arguments (given 2, expected 1)
- data frame and vector min and max slow
- How to speed up creating dataframe faster for large dataset HOT 1
- Suggested update to `DataFrame#to_matrix` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from daru.