1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/// Series implementations module.
///
/// This module provides the core Series data structure, a one-dimensional labeled array
/// capable of holding any data type with integer or string labels. Series is the building
/// block for DataFrames and provides many operations for data manipulation.
/// Base Series implementation with core operations.
///
/// The fundamental Series structure with essential methods for:
/// - Element access and slicing
/// - Arithmetic and comparison operations
/// - Sorting and ranking
/// - Type conversions
///
/// # Examples
///
/// ```rust
/// use pandrs::Series;
///
/// // Create a numeric series
/// let s = Series::new(vec![1, 2, 3, 4, 5], Some("numbers".to_string())).expect("Failed to create series");
///
/// // Basic operations
/// assert_eq!(s.len(), 5);
/// assert_eq!(s.name(), Some(&"numbers".to_string()));
/// ```
/// Categorical data type for memory-efficient string handling.
///
/// Provides categorical encoding for string data with:
/// - Memory-efficient storage
/// - Fast equality comparisons
/// - Ordered and unordered categories
///
/// # Examples
///
/// ```rust
/// use pandrs::Categorical;
///
/// let data = vec!["small", "medium", "large", "small", "large"];
/// let categories = vec!["small", "medium", "large"];
/// let cat = Categorical::new(data, Some(categories), true).expect("Failed to create");
/// ```
/// DateTime accessor for time-based operations on Series.
///
/// Provides specialized methods for datetime Series:
/// - Extract date components (year, month, day)
/// - Extract time components (hour, minute, second)
/// - Timezone conversions
/// - Date arithmetic
///
/// # Examples
///
/// ```rust,no_run
/// use pandrs::Series;
/// use chrono::NaiveDate;
///
/// let dates = vec![
/// NaiveDate::from_ymd_opt(2024, 1, 1).unwrap(),
/// NaiveDate::from_ymd_opt(2024, 6, 15).unwrap(),
/// ];
/// let s = Series::new(dates, Some("dates".to_string())).expect("Failed to create");
///
/// // Access datetime methods through .dt accessor
/// // let years = s.dt().year();
/// ```
/// Utility functions for Series operations.
///
/// Helper functions for common Series manipulations.
/// NA (Not Available) handling for missing data.
///
/// Provides methods for:
/// - Detecting missing values
/// - Filling missing values
/// - Dropping missing values
/// - Interpolation
/// String accessor for text operations on Series.
///
/// Provides vectorized string operations:
/// - Case conversions
/// - Pattern matching
/// - String splitting and joining
/// - Regular expressions
///
/// # Examples
///
/// ```rust
/// use pandrs::Series;
///
/// let s = Series::new(
/// vec!["hello", "world", "rust"],
/// Some("text".to_string())
/// ).expect("Failed to create");
///
/// // Access string methods through .str accessor
/// // let upper = s.str().upper();
/// ```
/// Window operations for rolling computations.
///
/// Provides windowing functionality:
/// - Rolling windows
/// - Expanding windows
/// - Exponentially weighted windows
///
/// # Examples
///
/// ```rust
/// use pandrs::Series;
///
/// let s = Series::new(vec![1.0, 2.0, 3.0, 4.0, 5.0], None).expect("Failed to create");
///
/// // Rolling mean with window size 3
/// // let rolling_mean = s.rolling(3).mean();
/// ```
// Re-exports for convenience
pub use Series;
pub use ;
pub use ;
pub use NASeries;
pub use StringAccessor;
pub use ;
// Optional feature re-exports
pub use SeriesGpuExt;
// Legacy exports for backward compatibility
pub use ;
// For backward compatibility (old NASeries)
pub use NASeries as LegacyNASeries;