multiple space in input should be interpreted as NaN

Issue #8 closed
Tim Cera repo owner created an issue

If there where multiple spaces in a column, instead of the multiple spaces being taken as NaN, the entire column was thrown out.

The file:

Datetime,Value,e,r,t,a,s,d,f,                                                    
2000-01-01 01:00:00, 1.5,,, ,,,,,                                                
2000-01-01 02:00:00, 2.5,,,  ,,,,,                                               
2000-01-01 03:00:00, 3.4,,,,,,,,                                                 
2000-01-02 03:00:00, 3.4,    ,,,,,,,                                                                                                         
2000-01-02 04:00:00, 3.4,,,,,,,,                                                 

when used with

tstoolbox aggregate --agg_interval D < test.csv

yielded:

Datetime,Value_mean,r_mean,a_mean,s_mean,d_mean,f_mean,Unnamed: 9_mean
2000-01-01,2.46667,,,,,,
2000-01-02,3.4,,,,,,

Comments (1)

  1. Tim Cera reporter

    BUG: If any column title was missing from heading line would fail. Now names the column "Unnamed: 1", ...etc. closes #7 BUG: If multiple spaces in columns would through out entire column. Now just becomes a NaN for that record. closes #8 resolves #3 since now using more of the pandas functions.

    → <<cset 150f13541745>>

  2. Log in to comment