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

Please add col number to glimpse output #666

Open
iamYannC opened this issue Jul 8, 2024 · 2 comments
Open

Please add col number to glimpse output #666

iamYannC opened this issue Jul 8, 2024 · 2 comments
Labels
help wanted ❤️ we'd love your help!

Comments

@iamYannC
Copy link

iamYannC commented Jul 8, 2024

Hey. I kinda struggled with trying to create a PR and finding the underlying code, so might be easier to ask here:

Glimpse is great, but I wish there was an added index-number of columns when the output is printed! that's it, as simple as that :)
example
Somewhere here.. maybe instead of the dollar sign?

@krlmlr
Copy link
Member

krlmlr commented Jul 9, 2024

Thanks, Yann, I like this idea! Can we make this an option, defaulting to the current behavior?

Search for glimpse.data.frame() . We'll want to make sure we add indentation space for more than 10, 100, 1000, ... columns, perhaps using format() .

@krlmlr krlmlr added help wanted ❤️ we'd love your help! and removed help wanted labels Mar 19, 2025
@moodymudskipper
Copy link

The glimpse() function is used to show conveniently the head of the data, similar to str() on data frames.

It displays the name of the column first on every line but we would like to add the option to display the index-numbers as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted ❤️ we'd love your help!
Projects
None yet
Development

No branches or pull requests

3 participants