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

support empty space separator #1489

Open
jkone27 opened this issue Sep 28, 2023 · 1 comment
Open

support empty space separator #1489

jkone27 opened this issue Sep 28, 2023 · 1 comment

Comments

@jkone27
Copy link

jkone27 commented Sep 28, 2023

some files like this one cannot be parsed by csv provider, as it uses empty space

https://www.ncei.noaa.gov/data/noaa-global-surface-temperature/v5/access/timeseries/aravg.ann.land_ocean.00N.30N.v5.0.0.202212.asc

ok was able to compile like this

type NoaDataProvider = CsvProvider<
    "https://www.ncei.noaa.gov/data/noaa-global-surface-temperature/v5/access/timeseries/aravg.ann.ocean.00N.30N.v5.0.0.202212.asc",
    "   ", IgnoreErrors=true>

but when i run in ionide i get

/Users/admin/Repositories/scripts/plotlyTest.fsx(8,46): error FS1156: This is not a valid numeric literal. Valid numeric literals include 1, 0x1, 0o1, 0b1, 1l (int/int32), 1u (uint/uint32), 1L (int64), 1UL (uint64), 1s (int16), 1us (uint16), 1y (int8/sbyte), 1uy (uint8/byte), 1.0 (float/double), 1.0f (float32/single), 1.0m (decimal), 1I (bigint).
@nhirschey
Copy link
Contributor

This is a fixed-width format file. It's not using separators. That's why the first "separator" is sometimes 3 spaces and sometimes 4 spaces. You'd need a fwf provider.

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