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

Table.summary() missing output is misleading #1173

Open
minhster99 opened this issue Dec 6, 2022 · 0 comments
Open

Table.summary() missing output is misleading #1173

minhster99 opened this issue Dec 6, 2022 · 0 comments

Comments

@minhster99
Copy link

minhster99 commented Dec 6, 2022

Hi

I read in a file with the following structure

 Index  |   Column Name    |  Column Type  |
--------------------------------------------
     0  |              id  |      INTEGER  |
     1  |            date  |   LOCAL_DATE  |
     2  |            time  |       STRING  |
     3  |    country_name  |       STRING  |
     4  |  state/province  |       STRING  |
     5  |      population  |      INTEGER  |
     6  |  landslide_type  |       STRING  |
     7  |         trigger  |       STRING  |
     8  |      fatalities  |      INTEGER  |

when I do a summary, I get the following

  Summary   |         id          |     date     |  time  |  country_name   |  state/province  |      population      |  landslide_type  |  trigger   |  fatalities  |
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
     Count  |               1693  |        1693  |  1693  |           1693  |            1693  |                1693  |            1693  |      1693  |        1693  |
       sum  |            7017532  |              |        |                 |                  |           158226757  |                  |            |              |
      Mean  |  4145.027761370351  |              |        |                 |                  |   93459.39574719437  |                  |            |              |
       Min  |                 34  |              |        |                 |                  |                   0  |                  |            |           0  |
       Max  |               7541  |              |        |                 |                  |            12294193  |                  |            |         280  |
     Range  |               7507  |              |        |                 |                  |            12294193  |                  |            |         280  |
  Variance  |  5003014.595564535  |              |        |                 |                  |  273112413878.66046  |                  |            |              |
  Std. Dev  |  2236.741959986564  |              |        |                 |                  |  522601.58235376637  |                  |            |              |
   Missing  |                     |           3  |        |                 |                  |                      |                  |            |              |
  Earliest  |                     |  2007-03-02  |        |                 |                  |                      |                  |            |              |
    Latest  |                     |  2016-03-02  |        |                 |                  |                      |                  |            |              |
    Unique  |                     |              |   159  |             28  |             227  |                      |              15  |        17  |              |
       Top  |                     |              |        |  United States  |        Kentucky  |                      |       Landslide  |  Downpour  |              |
 Top Freq.  |                     |              |  1065  |            986  |             124  |                      |             866  |       866  |              |

The missing value is only shown for date and it does work, I can verify there were 3 missing date values. However I also can see missing values for fatalities but it does not appear here. If I do the following

table.intColumn("fatalities").isMissing().size()  // returns > 0

I suspect that missing is not implemented on the summary() call for IntColumn types because if I simply select that single column and do a summary() on it, I get the following with no missing statistic

Column: fatalities  
 Measure   |  Value  |
----------------------
    Count  |   1690  |
      sum  |         |
     Mean  |         |
      Min  |      0  |
      Max  |    280  |
    Range  |    280  |
 Variance  |         |
 Std. Dev  |         |

Could we get that statistic filled in and for those statistics that aren't supported by the column type, could we add something like 'N/A' so that it is clear? Thanks.

ps this is a great lib. Really appreciate what you've done here!

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

1 participant