mirror of
https://github.com/nushell/nushell.git
synced 2025-07-08 02:17:22 +02:00
All of the dataframe commands ported over with no issues... ### 11 tests are commented out (for now) So 100 of the original 111 tests are passing with only 11 tests being ignored for now.. As per our conversation in the core team meeting on Wednesday I took @jntrnr suggestion and just commented out the tests dealing with [IntoDatetime](https://github.com/nushell/nushell/blob/main/crates/nu-command/src/conversions/into/mod.rs) Later on we can move this functionality out of nu-command if we decide it makes sense... ### The following tests were ignored... ```rust modified: crates/nu-cmd-dataframe/src/dataframe/series/date/get_day.rs modified: crates/nu-cmd-dataframe/src/dataframe/series/date/get_hour.rs modified: crates/nu-cmd-dataframe/src/dataframe/series/date/get_minute.rs modified: crates/nu-cmd-dataframe/src/dataframe/series/date/get_month.rs modified: crates/nu-cmd-dataframe/src/dataframe/series/date/get_nanosecond.rs modified: crates/nu-cmd-dataframe/src/dataframe/series/date/get_ordinal.rs modified: crates/nu-cmd-dataframe/src/dataframe/series/date/get_second.rs modified: crates/nu-cmd-dataframe/src/dataframe/series/date/get_week.rs modified: crates/nu-cmd-dataframe/src/dataframe/series/date/get_weekday.rs modified: crates/nu-cmd-dataframe/src/dataframe/series/date/get_year.rs modified: crates/nu-cmd-dataframe/src/dataframe/series/string/strftime.rs ```
96 lines
1.7 KiB
Rust
96 lines
1.7 KiB
Rust
mod date;
|
|
pub use date::*;
|
|
|
|
mod string;
|
|
pub use string::*;
|
|
|
|
mod masks;
|
|
pub use masks::*;
|
|
|
|
mod indexes;
|
|
pub use indexes::*;
|
|
|
|
mod all_false;
|
|
mod all_true;
|
|
mod arg_max;
|
|
mod arg_min;
|
|
mod cumulative;
|
|
mod n_null;
|
|
mod n_unique;
|
|
mod rolling;
|
|
mod shift;
|
|
mod unique;
|
|
mod value_counts;
|
|
|
|
use nu_protocol::engine::StateWorkingSet;
|
|
|
|
pub use all_false::AllFalse;
|
|
pub use all_true::AllTrue;
|
|
pub use arg_max::ArgMax;
|
|
pub use arg_min::ArgMin;
|
|
pub use cumulative::Cumulative;
|
|
pub use n_null::NNull;
|
|
pub use n_unique::NUnique;
|
|
pub use rolling::Rolling;
|
|
pub use shift::Shift;
|
|
pub use unique::Unique;
|
|
pub use value_counts::ValueCount;
|
|
|
|
pub fn add_series_decls(working_set: &mut StateWorkingSet) {
|
|
macro_rules! bind_command {
|
|
( $command:expr ) => {
|
|
working_set.add_decl(Box::new($command));
|
|
};
|
|
( $( $command:expr ),* ) => {
|
|
$( working_set.add_decl(Box::new($command)); )*
|
|
};
|
|
}
|
|
|
|
// Series commands
|
|
bind_command!(
|
|
AllFalse,
|
|
AllTrue,
|
|
ArgMax,
|
|
ArgMin,
|
|
ArgSort,
|
|
ArgTrue,
|
|
ArgUnique,
|
|
AsDate,
|
|
AsDateTime,
|
|
Concatenate,
|
|
Contains,
|
|
Cumulative,
|
|
GetDay,
|
|
GetHour,
|
|
GetMinute,
|
|
GetMonth,
|
|
GetNanosecond,
|
|
GetOrdinal,
|
|
GetSecond,
|
|
GetWeek,
|
|
GetWeekDay,
|
|
GetYear,
|
|
IsDuplicated,
|
|
IsIn,
|
|
IsNotNull,
|
|
IsNull,
|
|
IsUnique,
|
|
NNull,
|
|
NUnique,
|
|
NotSeries,
|
|
Replace,
|
|
ReplaceAll,
|
|
Rolling,
|
|
SetSeries,
|
|
SetWithIndex,
|
|
Shift,
|
|
StrLengths,
|
|
StrSlice,
|
|
StrFTime,
|
|
ToLowerCase,
|
|
ToUpperCase,
|
|
Unique,
|
|
ValueCount
|
|
);
|
|
}
|