Skip to content

Commit 74df4a4

Browse files
committed
changed type conversion table
1 parent 1d50a15 commit 74df4a4

File tree

6 files changed

+72
-67
lines changed

6 files changed

+72
-67
lines changed

docs/StardustDocs/topics/mean.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ See [statistics](summaryStatistics.md#groupby-statistics) for details on complex
4747

4848
The following automatic type conversions are performed for the `mean` operation:
4949

50-
| Conversion | skipNaN option |
51-
|----------------------------------------------------------------------------|----------------|
52-
| Int -> Double | |
53-
| Byte -> Double | |
54-
| Short -> Double | |
55-
| Long -> Double | |
56-
| Double -> Double | yes |
57-
| Float -> Double | yes |
58-
| Number -> Conversion([Common number type](numberUnification.md)) -> Double | yes |
59-
| Nothing / no values -> Double (NaN) | |
50+
| Conversion | Result for Empty Input |
51+
|----------------------------------------------------------------------------|------------------------|
52+
| Int -> Double | Double.NaN |
53+
| Byte -> Double | Double.NaN |
54+
| Short -> Double | Double.NaN |
55+
| Long -> Double | Double.NaN |
56+
| Double -> Double | Double.NaN |
57+
| Float -> Double | Double.NaN |
58+
| Number -> Conversion([Common number type](numberUnification.md)) -> Double | Double.NaN |
59+
| Nothing -> Double | Double.NaN |

docs/StardustDocs/topics/median.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,16 @@ See [statistics](summaryStatistics.md#groupby-statistics) for details on complex
5353

5454
### Type Conversion
5555

56-
The following automatic type conversions are performed for the `median` operation:
57-
58-
| Conversion | skipNaN option |
59-
|------------------------------------------|----------------|
60-
| T -> T? where T : Comparable<T> | |
61-
| Int -> Double? | |
62-
| Byte -> Double? | |
63-
| Short -> Double? | |
64-
| Long -> Double? | |
65-
| Double -> Double? | yes |
66-
| Float -> Double? | yes |
67-
| Nothing / no values -> Nothing? (`null`) | |
56+
The following automatic type conversions are performed for the `median` operation.
57+
(Note that `null` only appears in the return type when using `-orNull` overloads).
58+
59+
| Conversion | Result for Empty Input |
60+
|--------------------------------|------------------------|
61+
| T -> T where T : Comparable<T> | null |
62+
| Int -> Double | null |
63+
| Byte -> Double | null |
64+
| Short -> Double | null |
65+
| Long -> Double | null |
66+
| Double -> Double | null |
67+
| Float -> Double | null |
68+
| Nothing -> Nothing | null |

docs/StardustDocs/topics/minmax.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ See [statistics](summaryStatistics.md#groupby-statistics) for details on complex
4747
The following automatic type conversions are performed for the `min` and `max` operations.
4848
(Note that `null` only appears in the return type when using `-orNull` overloads).
4949

50-
| Conversion | skipNaN option |
51-
|------------------------------------------|----------------|
52-
| T -> T? where T : Comparable<T> | |
53-
| Int -> Int? | |
54-
| Byte -> Byte? | |
55-
| Short -> Short? | |
56-
| Long -> Long? | |
57-
| Double -> Double? | yes |
58-
| Float -> Float? | yes |
59-
| Nothing / no values -> Nothing? (`null`) | |
50+
| Conversion | Result for Empty Input |
51+
|--------------------------------|------------------------|
52+
| T -> T where T : Comparable<T> | null |
53+
| Int -> Int | null |
54+
| Byte -> Byte | null |
55+
| Short -> Short | null |
56+
| Long -> Long | null |
57+
| Double -> Double | null |
58+
| Float -> Float | null |
59+
| Nothing -> Nothing | null |

docs/StardustDocs/topics/percentile.md

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@ When it's set to `true`, `NaN` values are ignored.
3232

3333
### Quantile Estimation Methods
3434

35-
DataFrame follows [Hyndman, Rob & Fan, Yanan. (1996). Sample Quantiles in Statistical Packages. The American Statistician. 50. 361-365. 10.1080/00031305.1996.10473566.](https://www.researchgate.net/publication/222105754_Sample_Quantiles_in_Statistical_Packages)
35+
DataFrame
36+
follows [Hyndman, Rob & Fan, Yanan. (1996). Sample Quantiles in Statistical Packages. The American Statistician. 50. 361-365. 10.1080/00031305.1996.10473566.](https://www.researchgate.net/publication/222105754_Sample_Quantiles_in_Statistical_Packages)
3637
and [Apache Commons Statistics](https://svn.apache.org/repos/infra/websites/production/commons/content/proper/commons-statistics/commons-statistics-docs/apidocs/org/apache/commons/statistics/descriptive/Quantile.EstimationMethod.html)
37-
for the [9 commonly used quantile estimation methods](https://en.wikipedia.org/wiki/Quantile#Estimating_quantiles_from_a_sample).
38+
for
39+
the [9 commonly used quantile estimation methods](https://en.wikipedia.org/wiki/Quantile#Estimating_quantiles_from_a_sample).
3840

3941
For the `percentile` operation, DataFrame uses estimation method R3 when the given percentile needs
4042
to be selected from the values (like for self-comparable columns), and R8 when the given percentile can be
@@ -73,15 +75,16 @@ See [statistics](summaryStatistics.md#groupby-statistics) for details on complex
7375

7476
### Type Conversion
7577

76-
The following automatic type conversions are performed for the `percentile` operation:
77-
78-
| Conversion | skipNaN option |
79-
|------------------------------------------|----------------|
80-
| T -> T? where T : Comparable<T> | |
81-
| Int -> Double? | |
82-
| Byte -> Double? | |
83-
| Short -> Double? | |
84-
| Long -> Double? | |
85-
| Double -> Double? | yes |
86-
| Float -> Double? | yes |
87-
| Nothing / no values -> Nothing? (`null`) | |
78+
The following automatic type conversions are performed for the `percentile` operation.
79+
(Note that `null` only appears in the return type when using `-orNull` overloads).
80+
81+
| Conversion | Result for Empty Input |
82+
|--------------------------------|------------------------|
83+
| T -> T where T : Comparable<T> | null |
84+
| Int -> Double | null |
85+
| Byte -> Double | null |
86+
| Short -> Double | null |
87+
| Long -> Double | null |
88+
| Double -> Double | null |
89+
| Float -> Double | null |
90+
| Nothing -> Nothing | null |

docs/StardustDocs/topics/std.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@ set to `false` by default. This means that if a `NaN` is present in the input, i
1919
When it's set to `true`, `NaN` values are ignored.
2020

2121
### Delta Degrees of Freedom: DDoF
22+
2223
All `std` operations also have the `ddof`
2324
([Delta Degrees of Freedom](https://en.wikipedia.org/wiki/Degrees_of_freedom_%28statistics%29)) argument.
2425

25-
The default is set to `1`, meaning DataFrame uses
26+
The default is set to `1`, meaning DataFrame uses
2627
[Bessel’s correction](https://en.wikipedia.org/wiki/Bessel%27s_correction)
2728
to calculate the "unbiased sample standard deviation" by default.
2829
This is also the standard in languages like [R](https://www.r-project.org/).
@@ -58,13 +59,13 @@ See [statistics](summaryStatistics.md#groupby-statistics) for details on complex
5859

5960
The following automatic type conversions are performed for the `mean` operation:
6061

61-
| Conversion | skipNaN option |
62-
|----------------------------------------------------------------------------|----------------|
63-
| Int -> Double | |
64-
| Byte -> Double | |
65-
| Short -> Double | |
66-
| Long -> Double | |
67-
| Double -> Double | yes |
68-
| Float -> Double | yes |
69-
| Number -> Conversion([Common number type](numberUnification.md)) -> Double | yes |
70-
| Nothing / no values -> Double (NaN) | |
62+
| Conversion | Result for Empty Input |
63+
|----------------------------------------------------------------------------|------------------------|
64+
| Int -> Double | Double.NaN |
65+
| Byte -> Double | Double.NaN |
66+
| Short -> Double | Double.NaN |
67+
| Long -> Double | Double.NaN |
68+
| Double -> Double | Double.NaN |
69+
| Float -> Double | Double.NaN |
70+
| Number -> Conversion([Common number type](numberUnification.md)) -> Double | Double.NaN |
71+
| Nothing -> Double | Double.NaN |

docs/StardustDocs/topics/sum.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ See [statistics](summaryStatistics.md#groupby-statistics) for details on complex
4646

4747
The following automatic type conversions are performed for the `sum` operation:
4848

49-
| Conversion | skipNaN option |
50-
|----------------------------------------------------------------------------|----------------|
51-
| Int -> Int | |
52-
| Byte -> Int | |
53-
| Short -> Int | |
54-
| Long -> Long | |
55-
| Double -> Double | yes |
56-
| Float -> Float | yes |
57-
| Number -> Conversion([Common number type](numberUnification.md)) -> Number | yes |
58-
| Nothing / no values -> Double (0.0) | |
49+
| Conversion | Result for Empty Input |
50+
|----------------------------------------------------------------------------|------------------------|
51+
| Int -> Int | 0 |
52+
| Byte -> Int | 0 |
53+
| Short -> Int | 0 |
54+
| Long -> Long | 0L |
55+
| Double -> Double | 0.0 |
56+
| Float -> Float | 0.0f |
57+
| Number -> Conversion([Common number type](numberUnification.md)) -> Number | 0.0 |
58+
| Nothing -> Double | 0.0 |

0 commit comments

Comments
 (0)