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

Extra whitespace sneaking in csv export? #120

Open
icweaver opened this issue Oct 23, 2024 · 2 comments
Open

Extra whitespace sneaking in csv export? #120

icweaver opened this issue Oct 23, 2024 · 2 comments

Comments

@icweaver
Copy link

Howdy again, I just wanted to start by saying how much I LOVE this feature. It has been a huge time saver over scraping data from other services 🙌🏾

While working with a recent export, I noticed that some trailing whitespace seems to be present, and I was not sure if this was intended. In both the Dates <> people available and Name <> dates available formats, the extra character of whitespace looks to be added to the end of each name. Here's some sample output below showing this behavior:

Test_dates_people.csv preview
Date / Time,FirstName_A LastName_A ,FirstName_C MiddleName_C LastName_C ,FirstNameOnly_B- <-- trailing whitespace
"10/23/2024, 9:00:00 AM",Available,Available,Available
"10/23/2024, 9:15:00 AM",Available,Available,Available

Test_dates_people.csv

Test_name_dates.csv preview
Name,Date / Times available
FirstName_A LastName_A ,"10/23/2024, 9:00:00 AM","10/23/2024, 9:15:00 AM","10/23/2024, 9:30:00 AM","10/23/2024, 9:45:00 AM","10/23/2024, 10:00:00 AM","10/23/2024, 10:15:00 AM","10/23/2024, 10:30:00 AM","10/23/2024, 10:45:00 AM",,,,,,,,,,,,,,,,,,,,,,,,,"10/24/2024, 9:00:00 AM","10/24/2024, 9:15:00 AM","10/24/2024, 9:30:00 AM","10/24/2024, 9:45:00 AM","10/24/2024, 10:00:00 AM","10/24/2024, 10:15:00 AM","10/24/2024, 10:30:00 AM","10/24/2024, 10:45:00 AM",,,,,,,,,,,,,,,,,,,,,,,,,"10/25/2024, 9:00:00 AM","10/25/2024, 9:15:00 AM","10/25/2024, 9:30:00 AM","10/25/2024, 9:45:00 AM","10/25/2024, 10:00:00 AM","10/25/2024, 10:15:00 AM","10/25/2024, 10:30:00 AM","10/25/2024, 10:45:00 AM",,,,,,,,,,,,,,,,,,,,,,,,,"10/26/2024, 9:00:00 AM","10/26/2024, 9:15:00 AM","10/26/2024, 9:30:00 AM","10/26/2024, 9:45:00 AM","10/26/2024, 10:00:00 AM","10/26/2024, 10:15:00 AM","10/26/2024, 10:30:00 AM","10/26/2024, 10:45:00 AM",,,,,,,,,,,,,,,,,,,,,,,,
FirstName_C MiddleName_C LastName_C ,"10/23/2024, 9:00:00 AM","10/23/2024, 9:15:00 AM","10/23/2024, 9:30:00 AM","10/23/2024, 9:45:00 AM","10/23/2024, 10:00:00 AM","10/23/2024, 10:15:00 AM","10/23/2024, 10:30:00 AM","10/23/2024, 10:45:00 AM",,,,,,,,,,,,,,,,,,,,,,,,,"10/24/2024, 9:00:00 AM","10/24/2024, 9:15:00 AM","10/24/2024, 9:30:00 AM","10/24/2024, 9:45:00 AM","10/24/2024, 10:00:00 AM","10/24/2024, 10:15:00 AM","10/24/2024, 10:30:00 AM","10/24/2024, 10:45:00 AM",,,,,,,"10/24/2024, 12:30:00 PM","10/24/2024, 12:45:00 PM","10/24/2024, 1:00:00 PM","10/24/2024, 1:15:00 PM","10/24/2024, 1:30:00 PM","10/24/2024, 1:45:00 PM","10/24/2024, 2:00:00 PM","10/24/2024, 2:15:00 PM","10/24/2024, 2:30:00 PM","10/24/2024, 2:45:00 PM",,,,,,,,,"10/25/2024, 9:00:00 AM","10/25/2024, 9:15:00 AM","10/25/2024, 9:30:00 AM","10/25/2024, 9:45:00 AM","10/25/2024, 10:00:00 AM","10/25/2024, 10:15:00 AM","10/25/2024, 10:30:00 AM","10/25/2024, 10:45:00 AM",,,,,,,"10/25/2024, 12:30:00 PM","10/25/2024, 12:45:00 PM","10/25/2024, 1:00:00 PM","10/25/2024, 1:15:00 PM","10/25/2024, 1:30:00 PM","10/25/2024, 1:45:00 PM","10/25/2024, 2:00:00 PM","10/25/2024, 2:15:00 PM","10/25/2024, 2:30:00 PM","10/25/2024, 2:45:00 PM",,,,,,,,,"10/26/2024, 9:00:00 AM","10/26/2024, 9:15:00 AM","10/26/2024, 9:30:00 AM","10/26/2024, 9:45:00 AM","10/26/2024, 10:00:00 AM","10/26/2024, 10:15:00 AM","10/26/2024, 10:30:00 AM","10/26/2024, 10:45:00 AM",,,,,,,"10/26/2024, 12:30:00 PM","10/26/2024, 12:45:00 PM","10/26/2024, 1:00:00 PM","10/26/2024, 1:15:00 PM","10/26/2024, 1:30:00 PM","10/26/2024, 1:45:00 PM","10/26/2024, 2:00:00 PM","10/26/2024, 2:15:00 PM","10/26/2024, 2:30:00 PM","10/26/2024, 2:45:00 PM",,,,,,,,

Test_name_dates.csv

Anyway, it's not a big deal for me to just handle this in post-processing, and it only seems to affect name data, but I wanted to bring it up here in case there is a reasonable fix. Apologies if this is an intended feature that I am using incorrectly!

@jonyTF
Copy link
Member

jonyTF commented Oct 25, 2024

Hi yes this is intended because one of our users thought it was better to visualize the data this way.... do you prefer it to not have whitespace at all?

@icweaver
Copy link
Author

Right, no whitespace would be my preference. I usually just use CSVs as part of a pipeline instead of viewing the raw file directly, so visual aesthetics aren't really so much of a concern for me as having uniform formatting is

Currently, handling column names looks something like the following pseudo-code:

df = read("Test_dates_people.csv")

# No trailing space
df["Date / Time"]

# Different handling required
df["FirstName_A LastName_A "]

and requires special casing on respondents' names to be used later in the pipeline. Totally not a big deal, I can always normalize the column names beforehand or rstrip things, but not needing to do these steps is something that I think would be nice if possible

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