diff --git a/example/example_multidimensional.ipynb b/example/example_multidimensional.ipynb index e2a8935..b4b0177 100644 --- a/example/example_multidimensional.ipynb +++ b/example/example_multidimensional.ipynb @@ -693,28 +693,28 @@ " id (plants, quantity, price level) int64 64B 1003 1001 ... 1006\n", " location (plants, quantity, price level) <U2 64B 'es' 'fr' ... 'ch' 'fr'\n", " price (plants, quantity, price level) float64 64B 2.0 1.0 ... 15.0\n", - " supplier (plants, quantity, price level) <U4 128B 'sup1' ... 'sup2'
  • " ], "text/plain": [ " Size: 856B\n", @@ -809,15 +809,15 @@ "\n", "\n", "\n", - "
    scipp.Dataset (7.03 KB)
    " ], "text/plain": [ "\n", @@ -1267,22 +1267,22 @@ " id (product, quantity) int64 64B 1001 1002 1007 ... 1004 1005 1006\n", " location (product, quantity) <U2 64B 'fr' 'gb' 'es' ... 'ch' 'gb' 'fr'\n", " price (product, quantity) float64 64B 1.0 10.0 1.5 ... 20.0 1.5 15.0\n", - " supplier (product, quantity) <U4 128B 'sup1' 'sup1' ... 'sup2' 'sup2'
    • product
      PandasIndex
      PandasIndex(Index(['apple', 'carrot', 'orange', 'peppers'], dtype='object', name='product'))
    • quantity
      PandasIndex
      PandasIndex(Index(['1 kg', '10 kg'], dtype='object', name='quantity'))
  • " ], "text/plain": [ " Size: 976B\n", @@ -1367,13 +1367,13 @@ "\n", "\n", "\n", - "
    scipp.Dataset (7.24 KB)
      • product: 4
      • quantity: 2
      • plants
        (product)
        string
        𝟙
        fruit, vegetable, fruit, vegetable
        Values:
        ["fruit", "vegetable", "fruit", "vegetable"]
      • plts
        (product)
        string
        𝟙
        fr, ve, fr, ve
        Values:
        ["fr", "ve", "fr", "ve"]
      • price level
        (product)
        string
        𝟙
        low, high, high, low
        Values:
        ["low", "high", "high", "low"]
      • product
        (product)
        string
        𝟙
        apple, carrot, orange, peppers
        Values:
        ["apple", "carrot", "orange", "peppers"]
      • quantity
        (quantity)
        string
        𝟙
        1 kg, 10 kg
        Values:
        ["1 kg", "10 kg"]
      • valid
        ()
        string
        𝟙
        ok
        Values:
        'ok'
      • group
        (product, quantity)
        string
        𝟙
        fruit 1, fruit 10, ..., veget, veget
        Values:
        ["fruit 1", "fruit 10", ..., "veget", "veget"]
      • id
        (product, quantity)
        int64
        𝟙
        1001, 1002, ..., 1005, 1006
        Values:
        array([[1001, 1002],\n", + "
        scipp.Dataset (7.24 KB)
          • product: 4
          • quantity: 2
          • plants
            (product)
            string
            𝟙
            fruit, vegetable, fruit, vegetable
            Values:
            ["fruit", "vegetable", "fruit", "vegetable"]
          • plts
            (product)
            string
            𝟙
            fr, ve, fr, ve
            Values:
            ["fr", "ve", "fr", "ve"]
          • price level
            (product)
            string
            𝟙
            low, high, high, low
            Values:
            ["low", "high", "high", "low"]
          • product
            (product)
            string
            𝟙
            apple, carrot, orange, peppers
            Values:
            ["apple", "carrot", "orange", "peppers"]
          • quantity
            (quantity)
            string
            𝟙
            1 kg, 10 kg
            Values:
            ["1 kg", "10 kg"]
          • valid
            ()
            string
            𝟙
            ok
            Values:
            'ok'
          • group
            (product, quantity)
            string
            𝟙
            fruit 1, fruit 10, ..., veget, veget
            Values:
            ["fruit 1", "fruit 10", ..., "veget", "veget"]
          • id
            (product, quantity)
            int64
            𝟙
            1001, 1002, ..., 1005, 1006
            Values:
            array([[1001, 1002],\n", " [1007, 1008],\n", " [1003, 1004],\n", - " [1005, 1006]], dtype=int64)
          • location
            (product, quantity)
            string
            𝟙
            fr, gb, ..., gb, fr
            Values:
            ["fr", "gb", ..., "gb", "fr"]
          • price
            (product, quantity)
            float64
            𝟙
            1.0, 10.0, ..., 1.5, 15.0
            Values:
            array([[ 1. , 10. ],\n", + " [1005, 1006]], dtype=int64)
          • location
            (product, quantity)
            string
            𝟙
            fr, gb, ..., gb, fr
            Values:
            ["fr", "gb", ..., "gb", "fr"]
          • price
            (product, quantity)
            float64
            𝟙
            1.0, 10.0, ..., 1.5, 15.0
            Values:
            array([[ 1. , 10. ],\n", " [ 1.5, 20. ],\n", " [ 2. , 20. ],\n", - " [ 1.5, 15. ]])
          • supplier
            (product, quantity)
            string
            𝟙
            sup1, sup1, ..., sup2, sup2
            Values:
            ["sup1", "sup1", ..., "sup2", "sup2"]
      " + " [ 1.5, 15. ]])
    • supplier
      (product, quantity)
      string
      𝟙
      sup1, sup1, ..., sup2, sup2
      Values:
      ["sup1", "sup1", ..., "sup2", "sup2"]
    " ], "text/plain": [ "\n", diff --git a/example/xarray_pandas_converter.ipynb b/example/xarray_pandas_converter.ipynb index 1cf71e1..83f6d44 100644 --- a/example/xarray_pandas_converter.ipynb +++ b/example/xarray_pandas_converter.ipynb @@ -398,13 +398,13 @@ "Coordinates:\n", " * x (x) int32 8B 10 20\n", " * y (y) <U1 12B 'a' 'b' 'c'\n", - " along_x (x) float64 16B 0.3947 -0.05511\n", + " along_x (x) float64 16B 0.4158 1.14\n", " scalar int32 4B 123\n", "Data variables:\n", - " foo (x, y) float64 48B -0.1768 0.3231 -0.4494 1.791 1.605 -1.376\n", + " foo (x, y) float64 48B -3.42 -0.9061 0.4982 -1.323 1.837 0.2684\n", "Attributes:\n", - " example: Xarray user-guide" + " example: Xarray user-guide" ], "text/plain": [ " Size: 88B\n", @@ -412,10 +412,10 @@ "Coordinates:\n", " * x (x) int32 8B 10 20\n", " * y (y) \n", " 10\n", " a\n", - " -0.176827\n", - " 0.394717\n", + " -3.420051\n", + " 0.415806\n", " 123\n", " \n", " \n", " b\n", - " 0.323146\n", - " 0.394717\n", + " -0.906099\n", + " 0.415806\n", " 123\n", " \n", " \n", " c\n", - " -0.449401\n", - " 0.394717\n", + " 0.498232\n", + " 0.415806\n", " 123\n", " \n", " \n", " 20\n", " a\n", - " 1.791361\n", - " -0.055112\n", + " -1.322896\n", + " 1.140233\n", " 123\n", " \n", " \n", " b\n", - " 1.604509\n", - " -0.055112\n", + " 1.836943\n", + " 1.140233\n", " 123\n", " \n", " \n", " c\n", - " -1.376154\n", - " -0.055112\n", + " 0.268444\n", + " 1.140233\n", " 123\n", " \n", " \n", @@ -542,12 +542,12 @@ "text/plain": [ " foo along_x scalar\n", "x y \n", - "10 a -0.176827 0.394717 123\n", - " b 0.323146 0.394717 123\n", - " c -0.449401 0.394717 123\n", - "20 a 1.791361 -0.055112 123\n", - " b 1.604509 -0.055112 123\n", - " c -1.376154 -0.055112 123" + "10 a -3.420051 0.415806 123\n", + " b -0.906099 0.415806 123\n", + " c 0.498232 0.415806 123\n", + "20 a -1.322896 1.140233 123\n", + " b 1.836943 1.140233 123\n", + " c 0.268444 1.140233 123" ] }, "execution_count": 2, @@ -938,12 +938,12 @@ " * x (x) int32 8B 10 20\n", " * y (y) object 24B 'a' 'b' 'c'\n", "Data variables:\n", - " foo (x, y) float64 48B -0.1768 0.3231 -0.4494 1.791 1.605 -1.376\n", - " along_x (x, y) float64 48B 0.3947 0.3947 0.3947 -0.05511 -0.05511 -0.05511\n", - " scalar (x, y) int32 24B 123 123 123 123 123 123" + " foo (x, y) float64 48B -3.42 -0.9061 0.4982 -1.323 1.837 0.2684\n", + " along_x (x, y) float64 48B 0.4158 0.4158 0.4158 1.14 1.14 1.14\n", + " scalar (x, y) int32 24B 123 123 123 123 123 123" ], "text/plain": [ " Size: 152B\n", @@ -952,8 +952,8 @@ " * x (x) int32 8B 10 20\n", " * y (y) object 24B 'a' 'b' 'c'\n", "Data variables:\n", - " foo (x, y) float64 48B -0.1768 0.3231 -0.4494 1.791 1.605 -1.376\n", - " along_x (x, y) float64 48B 0.3947 0.3947 0.3947 -0.05511 -0.05511 -0.05511\n", + " foo (x, y) float64 48B -3.42 -0.9061 0.4982 -1.323 1.837 0.2684\n", + " along_x (x, y) float64 48B 0.4158 0.4158 0.4158 1.14 1.14 1.14\n", " scalar (x, y) int32 24B 123 123 123 123 123 123" ] }, @@ -1036,48 +1036,48 @@ " 0\n", " 10\n", " a\n", - " 0.394717\n", - " -0.176827\n", + " 0.415806\n", + " -3.420051\n", " 123\n", " \n", " \n", " 1\n", " 10\n", " b\n", - " 0.394717\n", - " 0.323146\n", + " 0.415806\n", + " -0.906099\n", " 123\n", " \n", " \n", " 2\n", " 10\n", " c\n", - " 0.394717\n", - " -0.449401\n", + " 0.415806\n", + " 0.498232\n", " 123\n", " \n", " \n", " 3\n", " 20\n", " a\n", - " -0.055112\n", - " 1.791361\n", + " 1.140233\n", + " -1.322896\n", " 123\n", " \n", " \n", " 4\n", " 20\n", " b\n", - " -0.055112\n", - " 1.604509\n", + " 1.140233\n", + " 1.836943\n", " 123\n", " \n", " \n", " 5\n", " 20\n", " c\n", - " -0.055112\n", - " -1.376154\n", + " 1.140233\n", + " 0.268444\n", " 123\n", " \n", " \n", @@ -1086,12 +1086,12 @@ ], "text/plain": [ " x y along_x foo scalar\n", - "0 10 a 0.394717 -0.176827 123\n", - "1 10 b 0.394717 0.323146 123\n", - "2 10 c 0.394717 -0.449401 123\n", - "3 20 a -0.055112 1.791361 123\n", - "4 20 b -0.055112 1.604509 123\n", - "5 20 c -0.055112 -1.376154 123" + "0 10 a 0.415806 -3.420051 123\n", + "1 10 b 0.415806 -0.906099 123\n", + "2 10 c 0.415806 0.498232 123\n", + "3 20 a 1.140233 -1.322896 123\n", + "4 20 b 1.140233 1.836943 123\n", + "5 20 c 1.140233 0.268444 123" ] }, "execution_count": 4, @@ -1169,39 +1169,39 @@ " \n", " 10\n", " a\n", - " 0.394717\n", - " -0.176827\n", + " 0.415806\n", + " -3.420051\n", " 123\n", " \n", " \n", " b\n", - " 0.394717\n", - " 0.323146\n", + " 0.415806\n", + " -0.906099\n", " 123\n", " \n", " \n", " c\n", - " 0.394717\n", - " -0.449401\n", + " 0.415806\n", + " 0.498232\n", " 123\n", " \n", " \n", " 20\n", " a\n", - " -0.055112\n", - " 1.791361\n", + " 1.140233\n", + " -1.322896\n", " 123\n", " \n", " \n", " b\n", - " -0.055112\n", - " 1.604509\n", + " 1.140233\n", + " 1.836943\n", " 123\n", " \n", " \n", " c\n", - " -0.055112\n", - " -1.376154\n", + " 1.140233\n", + " 0.268444\n", " 123\n", " \n", " \n", @@ -1211,12 +1211,12 @@ "text/plain": [ " along_x:float64 foo:float64 scalar:int32\n", "x:int32 y:string \n", - "10 a 0.394717 -0.176827 123\n", - " b 0.394717 0.323146 123\n", - " c 0.394717 -0.449401 123\n", - "20 a -0.055112 1.791361 123\n", - " b -0.055112 1.604509 123\n", - " c -0.055112 -1.376154 123" + "10 a 0.415806 -3.420051 123\n", + " b 0.415806 -0.906099 123\n", + " c 0.415806 0.498232 123\n", + "20 a 1.140233 -1.322896 123\n", + " b 1.140233 1.836943 123\n", + " c 1.140233 0.268444 123" ] }, "execution_count": 6, @@ -1661,11 +1661,11 @@ "Coordinates:\n", " * x (x) int32 8B 10 20\n", " * y (y) <U1 12B 'a' 'b' 'c'\n", - " along_x (x) float64 16B 0.3947 -0.05511\n", + " along_x (x) float64 16B 0.4158 1.14\n", " scalar int32 4B 123\n", "Data variables:\n", - " foo (x, y) float64 48B -0.1768 0.3231 -0.4494 1.791 1.605 -1.376" + " foo (x, y) float64 48B -3.42 -0.9061 0.4982 -1.323 1.837 0.2684" ], "text/plain": [ " Size: 88B\n", @@ -1673,10 +1673,10 @@ "Coordinates:\n", " * x (x) int32 8B 10 20\n", " * y (y) " + " example: Xarray user-guide" ], "text/plain": [ " Size: 88B\n", @@ -2115,10 +2115,10 @@ "Coordinates:\n", " * x (x) int32 8B 10 20\n", " * y (y)