@@ -6,21 +6,20 @@ use matplotlib as plt;
6
6
7
7
fn main ( ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
8
8
let ( fig, [ [ mut ax] ] ) = plt:: subplots ( ) ?;
9
- let pseudacorus_sepal_length = Series :: new (
9
+ let pseudacorus_sepal_length = Column :: new (
10
10
"Pseudacorus_Sepal_Length" . into ( ) ,
11
11
& [ 6.0 , 6.0 , 5.8 , 6.5 , 5.7 , 6.8 , 6.5 , 6.8 , 7.0 , 6.2 , 6.5 , 6.6 , 7.0 , 7.0 , 7.5 , 7.0 ,
12
12
6.8 , 6.5 , 6.3 , 6.2 , 6.9 , 6.3 , 6.3 , 7.0 , 6.2 , 6.8 , 6.2 , 6.3 , 5.8 , 5.9 , 6.2 , 6.3 ,
13
13
6.9 , 7.3 , 7.5 , 6.4 , 6.6 , 6.4 , 6.7 , 6.4 , 6.4 , 6.6 , 6.4 , 6.2 , 6.3 , 7.9 , 6.9 , 6.2 ,
14
14
5.9 , 6.3 ] ) ;
15
- let pseudacorus_sepal_width = Series :: new (
15
+ let pseudacorus_sepal_width = Column :: new (
16
16
"Pseudacorus_Sepal_width" . into ( ) ,
17
17
& [ 4.0 , 3.1 , 4.0 , 3.8 , 3.4 , 3.7 , 4.7 , 4.0 , 4.5 , 3.2 , 3.9 , 4.0 , 4.1 , 4.0 , 4.6 , 4.4 ,
18
18
4.0 , 4.2 , 3.9 , 4.0 , 4.8 , 4.0 , 4.2 , 3.8 , 3.6 , 3.3 , 3.4 , 3.5 , 3.1 , 3.7 , 4.4 , 4.5 ,
19
19
4.4 , 4.2 , 4.2 , 4.4 , 4.0 , 4.2 , 4.0 , 4.9 , 4.3 , 4.4 , 3.6 , 3.8 , 3.5 , 4.3 , 4.6 , 3.8 ,
20
20
3.6 , 3.8 ] ) ;
21
21
let df = DataFrame :: new ( vec ! [
22
- Column :: Series ( pseudacorus_sepal_length) ,
23
- Column :: Series ( pseudacorus_sepal_width) ] ) ?;
22
+ pseudacorus_sepal_length, pseudacorus_sepal_width] ) ?;
24
23
println ! ( "df is {:?}" , & df) ;
25
24
let x_col = df. column ( "Pseudacorus_Sepal_Length" ) ?. f64 ( ) ?;
26
25
let y_col = df. column ( "Pseudacorus_Sepal_width" ) ?. f64 ( ) ?;
0 commit comments