Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sort-by-column breaks print-all #432

Open
harold opened this issue Nov 12, 2024 · 1 comment
Open

sort-by-column breaks print-all #432

harold opened this issue Nov 12, 2024 · 1 comment

Comments

@harold
Copy link
Contributor

harold commented Nov 12, 2024

user> (require '[tech.v3.dataset :as ds])
nil
user> (ds/->dataset {:x (repeatedly 50 rand)})
_unnamed [50 1]:

|         :x |
|-----------:|
| 0.36352526 |
| 0.63735866 |
| 0.22694948 |
| 0.09752657 |
| 0.49453822 |
| 0.32147979 |
| 0.23350832 |
| 0.93384102 |
| 0.82810687 |
| 0.96494813 |
|        ... |
| 0.18424102 |
| 0.17658029 |
| 0.22547325 |
| 0.49033910 |
| 0.99899914 |
| 0.20741585 |
| 0.17089799 |
| 0.65689539 |
| 0.69297945 |
| 0.04296759 |
| 0.49637671 |
user> (def ds *1)
#'user/ds
user> (ds/print-all ds)
_unnamed [50 1]:

|         :x |
|-----------:|
| 0.36352526 |
| 0.63735866 |
| 0.22694948 |
| 0.09752657 |
| 0.49453822 |
| 0.32147979 |
| 0.23350832 |
| 0.93384102 |
| 0.82810687 |
| 0.96494813 |
| 0.42021246 |
| 0.27738566 |
| 0.19981207 |
| 0.00565142 |
| 0.54424435 |
| 0.55123868 |
| 0.68356946 |
| 0.79959400 |
| 0.50870085 |
| 0.39017958 |
| 0.24623613 |
| 0.83501386 |
| 0.17211149 |
| 0.69400200 |
| 0.01374459 |
| 0.66713514 |
| 0.65133519 |
| 0.53489994 |
| 0.64317967 |
| 0.19028578 |
| 0.70258290 |
| 0.27052081 |
| 0.79618971 |
| 0.96664911 |
| 0.03191530 |
| 0.70744175 |
| 0.99135107 |
| 0.46470724 |
| 0.93441546 |
| 0.18424102 |
| 0.17658029 |
| 0.22547325 |
| 0.49033910 |
| 0.99899914 |
| 0.20741585 |
| 0.17089799 |
| 0.65689539 |
| 0.69297945 |
| 0.04296759 |
| 0.49637671 |
user> (ds/sort-by-column ds :x)
_unnamed [50 1]:

|         :x |
|-----------:|
| 0.00565142 |
| 0.01374459 |
| 0.03191530 |
| 0.04296759 |
| 0.09752657 |
| 0.17089799 |
| 0.17211149 |
| 0.17658029 |
| 0.18424102 |
| 0.19028578 |
|        ... |
| 0.70744175 |
| 0.79618971 |
| 0.79959400 |
| 0.82810687 |
| 0.83501386 |
| 0.93384102 |
| 0.93441546 |
| 0.96494813 |
| 0.96664911 |
| 0.99135107 |
| 0.99899914 |
user> (ds/sort-by-column (ds/print-all ds) :x)
_unnamed [50 1]:

|         :x |
|-----------:|
| 0.00565142 |
| 0.01374459 |
| 0.03191530 |
| 0.04296759 |
| 0.09752657 |
| 0.17089799 |
| 0.17211149 |
| 0.17658029 |
| 0.18424102 |
| 0.19028578 |
|        ... |
| 0.70744175 |
| 0.79618971 |
| 0.79959400 |
| 0.82810687 |
| 0.83501386 |
| 0.93384102 |
| 0.93441546 |
| 0.96494813 |
| 0.96664911 |
| 0.99135107 |
| 0.99899914 |
user> (ds/print-all (ds/sort-by-column ds :x))
_unnamed [50 1]:

|         :x |
|-----------:|
| 0.00565142 |
| 0.01374459 |
| 0.03191530 |
| 0.04296759 |
| 0.09752657 |
| 0.17089799 |
| 0.17211149 |
| 0.17658029 |
| 0.18424102 |
| 0.19028578 |
| 0.19981207 |
| 0.20741585 |
| 0.22547325 |
| 0.22694948 |
| 0.23350832 |
| 0.24623613 |
| 0.27052081 |
| 0.27738566 |
| 0.32147979 |
| 0.36352526 |
| 0.39017958 |
| 0.42021246 |
| 0.46470724 |
| 0.49033910 |
| 0.49453822 |
| 0.49637671 |
| 0.50870085 |
| 0.53489994 |
| 0.54424435 |
| 0.55123868 |
| 0.63735866 |
| 0.64317967 |
| 0.65133519 |
| 0.65689539 |
| 0.66713514 |
| 0.68356946 |
| 0.69297945 |
| 0.69400200 |
| 0.70258290 |
| 0.70744175 |
| 0.79618971 |
| 0.79959400 |
| 0.82810687 |
| 0.83501386 |
| 0.93384102 |
| 0.93441546 |
| 0.96494813 |
| 0.96664911 |
| 0.99135107 |
| 0.99899914 |

Metadata lost?

@cnuernber
Copy link
Collaborator

yep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants