-
Notifications
You must be signed in to change notification settings - Fork 92
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
Data Explorer: emptiness in column names #3084
Comments
Although, tbf - this is not really a valid data.frame name > names(example)
[1] "" "age" "age "
> example[""]
Error in `[.data.frame`:
! undefined columns selected
Show Traceback
> tibble::tibble(example)
Error in `env[[name]] <- x`:
! attempt to use zero-length variable name
Show Traceback But it does work in Pandas # blank names
import pandas as pd
num_print = pd.DataFrame({'Name':['Ashika', 'Tanu', 'Ashwin', 'Mohit', 'Sourabh'],
'': [100000000, 100025000, 210000000, 190000000, 0.100000000115151]})
>>> num_print[""]
0 100000000.0
1 100025000.0
2 210000000.0
3 190000000.0
4 0.1
Name: , dtype: float64 Also even works for summary statistics: # blank names
import pandas as pd
num_print = pd.DataFrame({'Name':['Ashika', 'Tanu', 'Ashwin', 'Mohit', 'Sourabh'],
'age': [100000000, 100025000, 210000000, 190000000, 0.100000000115151]})
num_print.rename(columns = {'age': '', 'Name': ''}, inplace=True) |
Several years ago I spent a lot of time ruminating on names in the R world, most especially in the context of data.frames. I'll link the write-up of where all of that ended up, in case ideas or vocabulary are helpful in working out what we're going to support here: |
@EmilHvitfeldt I split off your other example of leading/trailing whitespace into a separate issue: #3089 |
A strawman solution started here, can be refined into a finalized strategy once we gather feedback / ideas: #5653 |
…g whitespace or empty string (#5653) Aims to address #3084, #3089. Related to #5652, we also cannot distinguish empty strings or strings with leading whitespace in column names both in the data grid headers and the summary panel. This PR applies the same approach we used for data cells to format column names in the grid headers and the summary pane.
This was half addressed in #5653. Ark is returning the string |
See Ark change: posit-dev/ark#659 |
Merged that PR -- this can be verified after the next Ark version bump |
Verified FixedPositron Version(s) : 2025.02.0-14 Test scenario(s)Empty column name now shows as Link(s) to TestRail test cases run or created: |
Positron Version:
Positron Version: 2024.05.0 (Universal) build 1157
Code - OSS Version: 1.89.0
Commit: ed7ad00
Date: 2024-05-07T08:14:42.800Z
Electron: 28.2.8
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Darwin arm64 23.4.0
Steps to reproduce the issue:
What did you expect to happen?
I don't have a good solution, but I still have nightmares from the time I had a dataset with column names, padded with spaces
Were there any error messages in the output or Developer Tools console?
Nope
The text was updated successfully, but these errors were encountered: