diff --git a/docs/HTML/drop_missing.html b/docs/HTML/drop_missing.html index 27c6bb7b..e25ff120 100644 --- a/docs/HTML/drop_missing.html +++ b/docs/HTML/drop_missing.html @@ -43,13 +43,13 @@
-enum class drop_policy : unsigned charĀ { - all = 1, // Remove row if all columns are nan - any = 2, // Remove row if any column is nan - threshold = 3 // Remove row if threshold number of columns are nan -};+
enum class drop_policy : unsigned char { + all = 1, // Remove row if all columns are nan + any = 2, // Remove row if any column is nan + threshold = 3 // Remove row if threshold number of columns are nan +}; +
-template<typename ... Ts> -void -drop_missing(drop_policy policy, std::size_t threshold = 0); -+
template<typename ... Ts> +void +drop_missing(drop_policy policy, std::size_t threshold = 0); +
-enum class fill_policy : unsigned char { - // Fill all missing values with the given substitute - // - value = 1, - - // Fill the missing values with the previous value - // - fill_forward = 2, - - // Fill the missing values with the next value - // - fill_backward = 3, - - // X - X1 - // Y = Y1 + --------- * (Y2 - Y1) - // X2 - X1 - // Use the index column as X coordinate and the given column as Y coordinate - // - linear_interpolate = 4, - - // Fill missing values with mid-point of surrounding values - // - mid_point = 5, - - // O(n2) algorithm for each missing value. It uses the index as X coordinate - // This is very much a garbage in, garbage out algorithm. - // The index and column data must be in the same scale and be correlated. - // - lagrange_interpolate = 6, -};+
enum class fill_policy : unsigned char { + // Fill all missing values with the given substitute + // + value = 1, + + // Fill the missing values with the previous value + // + fill_forward = 2, + + // Fill the missing values with the next value + // + fill_backward = 3, + + // X - X1 + // Y = Y1 + --------- * (Y2 - Y1) + // X2 - X1 + // Use the index column as X coordinate and the given column as Y coordinate + // + linear_interpolate = 4, + + // Fill missing values with mid-point of surrounding values + // + mid_point = 5, + + // O(n2) algorithm for each missing value. It uses the index as X coordinate + // This is very much a garbage in, garbage out algorithm. + // The index and column data must be in the same scale and be correlated. + // + lagrange_interpolate = 6, +}; +
-template<typename T> -void -fill_missing(const std::vector+&col_names, - fill_policy policy, - const std::vector &values = { }, - int limit = -1); -
template<typename T> +void +fill_missing(const std::vector &col_names, + fill_policy policy, + const std::vector &values = { }, + int limit = -1); +
-template<typename DF, typename ... Ts> -void -fill_missing(const DF &rhs); -+
template<typename DF, typename ... Ts> +void +fill_missing(const DF &rhs); + +
-template<comparable T, typename ... Ts> -DataFrame -get_above_quantile_data(const char *col_name, - double quantile) const; -+
template<comparable T, typename ... Ts> +DataFrame +get_above_quantile_data(const char *col_name, + double quantile) const; +
-template<comparable T, typename ... Ts> -PtrView -get_above_quantile_view(const char *col_name, - double quantile); -+
template<comparable T, typename ... Ts> +PtrView +get_above_quantile_view(const char *col_name, + double quantile); +
-template<comparable T, typename ... Ts> -ConstPtrView -get_above_quantile_view(const char *col_name, - double quantile) const; -+
template<comparable T, typename ... Ts> +ConstPtrView +get_above_quantile_view(const char *col_name, + double quantile) const; +
-template<comparable T, typename ... Ts> -DataFrame -get_below_quantile_data(const char *col_name, - double quantile) const; -+
template<comparable T, typename ... Ts> +DataFrame +get_below_quantile_data(const char *col_name, + double quantile) const; +
-template<comparable T, typename ... Ts> -PtrView -get_below_quantile_view(const char *col_name, - double quantile); -+
template<comparable T, typename ... Ts> +PtrView +get_below_quantile_view(const char *col_name, + double quantile); +
-template<comparable T, typename ... Ts> -ConstPtrView -get_below_quantile_view(const char *col_name, - double quantile) const; -+
template<comparable T, typename ... Ts> +ConstPtrView +get_below_quantile_view(const char *col_name, + double quantile) const; +
-template<typename ... Ts> -DataFrame<I> -get_data(const std::vector<const char *> col_names) const; -+
template<typename ... Ts> +DataFrame<I> +get_data(const std::vector<const char *> col_names) const; +
-template<typename ... Ts> -View -get_view(const std::vector<const char *> col_names); -+
template<typename ... Ts> +View +get_view(const std::vector<const char *> col_names); +
-template<typename ... Ts> -ConstView -get_view(const std::vector<const char *> col_names) const; -+
template<typename ... Ts> +ConstView +get_view(const std::vector<const char *> col_names) const; +
-template<typename ... Ts> -DataFrame<DateTime, H> -get_data_after_times(DateTime::HourType hour, // 24 hour - DateTime::MinuteType minute = 0, - DateTime::SecondType second = 0, - DateTime::MillisecondType msec = 0) const; -+
template<typename ... Ts> +DataFrame<DateTime, H> +get_data_after_times(DateTime::HourType hour, // 24 hour + DateTime::MinuteType minute = 0, + DateTime::SecondType second = 0, + DateTime::MillisecondType msec = 0) const; +
-template<typename ... Ts> -PtrView -get_view_after_times(DateTime::HourType hour, // 24 hour - DateTime::MinuteType minute = 0, - DateTime::SecondType second = 0, - DateTime::MillisecondType msec = 0); -+
template<typename ... Ts> +PtrView +get_view_after_times(DateTime::HourType hour, // 24 hour + DateTime::MinuteType minute = 0, + DateTime::SecondType second = 0, + DateTime::MillisecondType msec = 0); +
-template<typename ... Ts> -ConstPtrView -get_view_after_times(DateTime::HourType hour, // 24 hour - DateTime::MinuteType minute = 0, - DateTime::SecondType second = 0, - DateTime::MillisecondType msec = 0) const; -+
template<typename ... Ts> +ConstPtrView +get_view_after_times(DateTime::HourType hour, // 24 hour + DateTime::MinuteType minute = 0, + DateTime::SecondType second = 0, + DateTime::MillisecondType msec = 0) const; +
-template<typename ... Ts> -DataFrame<DateTime, H> -get_data_at_times(DateTime::HourType hour, // 24 hour - DateTime::MinuteType minute = 0, - DateTime::SecondType second = 0, - DateTime::MillisecondType msec = 0) const; -+
template<typename ... Ts> +DataFrame<DateTime, H> +get_data_at_times(DateTime::HourType hour, // 24 hour + DateTime::MinuteType minute = 0, + DateTime::SecondType second = 0, + DateTime::MillisecondType msec = 0) const; +
-template<typename ... Ts> -PtrView -get_view_at_times(DateTime::HourType hour, // 24 hour - DateTime::MinuteType minute = 0, - DateTime::SecondType second = 0, - DateTime::MillisecondType msec = 0); -+
template<typename ... Ts> +PtrView +get_view_at_times(DateTime::HourType hour, // 24 hour + DateTime::MinuteType minute = 0, + DateTime::SecondType second = 0, + DateTime::MillisecondType msec = 0); +
-template<typename ... Ts> -ConstPtrView -get_view_at_times(DateTime::HourType hour, // 24 hour - DateTime::MinuteType minute = 0, - DateTime::SecondType second = 0, - DateTime::MillisecondType msec = 0) const; -+
template<typename ... Ts> +PtrView +get_view_at_times(DateTime::HourType hour, // 24 hour + DateTime::MinuteType minute = 0, + DateTime::SecondType second = 0, + DateTime::MillisecondType msec = 0); +
-template<typename ... Ts> -DataFrame<DateTime, H> -get_data_before_times(DateTime::HourType hour, // 24 hour - DateTime::MinuteType minute = 0, - DateTime::SecondType second = 0, - DateTime::MillisecondType msec = 0) const; -+
template<typename ... Ts> +DataFrame<DateTime, H> +get_data_before_times(DateTime::HourType hour, // 24 hour + DateTime::MinuteType minute = 0, + DateTime::SecondType second = 0, + DateTime::MillisecondType msec = 0) const; +
-template<typename ... Ts> -PtrView -get_view_before_times(DateTime::HourType hour, // 24 hour - DateTime::MinuteType minute = 0, - DateTime::SecondType second = 0, - DateTime::MillisecondType msec = 0); -+
template<typename ... Ts> +PtrView +get_view_before_times(DateTime::HourType hour, // 24 hour + DateTime::MinuteType minute = 0, + DateTime::SecondType second = 0, + DateTime::MillisecondType msec = 0); +
-template<typename ... Ts> -ConstPtrView -get_view_before_times(DateTime::HourType hour, // 24 hour - DateTime::MinuteType minute = 0, - DateTime::SecondType second = 0, - DateTime::MillisecondType msec = 0) const; -+
template<typename ... Ts> +ConstPtrView +get_view_before_times(DateTime::HourType hour, // 24 hour + DateTime::MinuteType minute = 0, + DateTime::SecondType second = 0, + DateTime::MillisecondType msec = 0) const; +
-template<typename ... Ts> -DataFrame<DateTime, H> -get_data_between_times(DateTime::HourType start_hour, // 24 hour - DateTime::HourType end_hour, // 24 hour - DateTime::MinuteType start_minute = 0, - DateTime::MinuteType end_minute = 0, - DateTime::SecondType start_second = 0, - DateTime::SecondType end_second = 0, - DateTime::MillisecondType start_msec = 0, - DateTime::MillisecondType end_msec = 0) const; -+
template<typename ... Ts> +DataFrame<DateTime, H> +get_data_between_times(DateTime::HourType start_hour, // 24 hour + DateTime::HourType end_hour, // 24 hour + DateTime::MinuteType start_minute = 0, + DateTime::MinuteType end_minute = 0, + DateTime::SecondType start_second = 0, + DateTime::SecondType end_second = 0, + DateTime::MillisecondType start_msec = 0, + DateTime::MillisecondType end_msec = 0) const; +
-template<typename ... Ts> -PtrView -get_view_between_times(DateTime::HourType start_hour, // 24 hour - DateTime::HourType end_hour, // 24 hour - DateTime::MinuteType start_minute = 0, - DateTime::MinuteType end_minute = 0, - DateTime::SecondType start_second = 0, - DateTime::SecondType end_second = 0, - DateTime::MillisecondType start_msec = 0, - DateTime::MillisecondType end_msec = 0); -+
template<typename ... Ts> +PtrView +get_view_between_times(DateTime::HourType start_hour, // 24 hour + DateTime::HourType end_hour, // 24 hour + DateTime::MinuteType start_minute = 0, + DateTime::MinuteType end_minute = 0, + DateTime::SecondType start_second = 0, + DateTime::SecondType end_second = 0, + DateTime::MillisecondType start_msec = 0, + DateTime::MillisecondType end_msec = 0); +
-template<typename ... Ts> -ConstPtrView -get_view_between_times(DateTime::HourType start_hour, // 24 hour - DateTime::HourType end_hour, // 24 hour - DateTime::MinuteType start_minute = 0, - DateTime::MinuteType end_minute = 0, - DateTime::SecondType start_second = 0, - DateTime::SecondType end_second = 0, - DateTime::MillisecondType start_msec = 0, - DateTime::MillisecondType end_msec = 0) const; -+
template<typename ... Ts> +ConstPtrView +get_view_between_times(DateTime::HourType start_hour, // 24 hour + DateTime::HourType end_hour, // 24 hour + DateTime::MinuteType start_minute = 0, + DateTime::MinuteType end_minute = 0, + DateTime::SecondType start_second = 0, + DateTime::SecondType end_second = 0, + DateTime::MillisecondType start_msec = 0, + DateTime::MillisecondType end_msec = 0) const; +
-template<arithmetic T, typename ... Ts> -std::vector<DataFrame> -get_data_by_affin(const char *col_name, - std::function<double(const T &x, const T &y)> &&dfunc = - [](const T &x, const T &y) -> double { - return ((x - y) * (x - y)); - }, - size_type num_of_iter = 20, - double damping_factor = 0.9) const; -+
template<arithmetic T, typename ... Ts> +std::vector<DataFrame> +get_data_by_affin(const char *col_name, + std::function<double(const T &x, const T &y)> &&dfunc = + [](const T &x, const T &y) -> double { + return ((x - y) * (x - y)); + }, + size_type num_of_iter = 20, + double damping_factor = 0.9) const; +
-template<arithmetic T, typename ... Ts> -std::vector<PtrView> -get_view_by_affin(const char *col_name, - std::function<double(const T &x, const T &y)> &&dfunc = - [](const T &x, const T &y) -> double { - return ((x - y) * (x - y)); - }, - size_type num_of_iter = 20, - double damping_factor = 0.9); -+
template<arithmetic T, typename ... Ts> +std::vector<PtrView> +get_view_by_affin(const char *col_name, + std::function<double(const T &x, const T &y)> &&dfunc = + [](const T &x, const T &y) -> double { + return ((x - y) * (x - y)); + }, + size_type num_of_iter = 20, + double damping_factor = 0.9); +
-template<arithmetic T, typename ... Ts> -std::vector<ConstPtrView> -get_view_by_affin(const char *col_name, - std::function<double(const T &x, const T &y)> &&dfunc = - [](const T &x, const T &y) -> double { - return ((x - y) * (x - y)); - }, - size_type num_of_iter = 20, - double damping_factor = 0.9) const; -+
template<arithmetic T, typename ... Ts> +std::vector<ConstPtrView> +get_view_by_affin(const char *col_name, + std::function<double(const T &x, const T &y)> &&dfunc = + [](const T &x, const T &y) -> double { + return ((x - y) * (x - y)); + }, + size_type num_of_iter = 20, + double damping_factor = 0.9) const; +
-template<arithmetic T, typename ... Ts> -std::vector<DataFrame> -get_data_by_dbscan(const char *col_name, - long min_members, - double max_distance, - std::function<double(const T &x, const T &y)> &&dfunc = - [](const T &x, const T &y) -> double { - return ((x - y) * (x - y)); - }) const; - -+
template<arithmetic T, typename ... Ts> +std::vector<DataFrame> +get_data_by_dbscan(const char *col_name, + long min_members, + double max_distance, + std::function<double(const T &x, const T &y)> &&dfunc = + [](const T &x, const T &y) -> double { + return ((x - y) * (x - y)); + }) const; +
-template<arithmetic T, typename ... Ts> -std::vector<PtrView> -get_view_by_dbscan(const char *col_name, - long min_members, - double max_distance, - std::function<double(const T &x, const T &y)> &&dfunc = - [](const T &x, const T &y) -> double { - return ((x - y) * (x - y)); - }); -+
template<arithmetic T, typename ... Ts> +std::vector<PtrView> +get_view_by_dbscan(const char *col_name, + long min_members, + double max_distance, + std::function<double(const T &x, const T &y)> &&dfunc = + [](const T &x, const T &y) -> double { + return ((x - y) * (x - y)); + }); + +
-template<arithmetic T, typename ... Ts> -std::vector<ConstPtrView> -get_view_by_dbscan(const char *col_name, - long min_members, - double max_distance, - std::function<double(const T &x, const T &y)> &&dfunc = - [](const T &x, const T &y) -> double { - return ((x - y) * (x - y)); - }) const; -+
template<arithmetic T, typename ... Ts> +std::vector<ConstPtrView> +get_view_by_dbscan(const char *col_name, + long min_members, + double max_distance, + std::function<double(const T &x, const T &y)> &&dfunc = + [](const T &x, const T &y) -> double { + return ((x - y) * (x - y)); + }) const; +
-template<typename ... Ts> -DataFrame -get_data_by_idx(Index2D<IndexType> range) const; -+
template<typename ... Ts> +DataFrame +get_data_by_idx(Index2D<IndexType> range) const; +
-template<typename ... Ts> -DataFrame -get_data_by_idx(const std::vector<IndexType> &values) const; -+
template<typename ... Ts> +DataFrame +get_data_by_idx(const std::vector<IndexType> &values) const; +
-template<typename ... Ts> -View -get_view_by_idx(Index2D<IndexType> range); -+
template<typename ... Ts> +View +get_view_by_idx(Index2D<IndexType> range); +
-template<typename ... Ts> -PtrView -get_view_by_idx(const std::vector<IndexType> &values); -+
template<typename ... Ts> +PtrView +get_view_by_idx(const std::vector<IndexType> &values); +
-template<typename ... Ts> -ConstView -get_view_by_idx(Index2D<IndexType> range) const; -+
template<typename ... Ts> +ConstView +get_view_by_idx(Index2D<IndexType> range) const; +
-template<typename ... Ts> -ConstPtrView -get_view_by_idx(const std::vector<IndexType> &values) const; -+
template<typename ... Ts> +ConstPtrView +get_view_by_idx(const std::vector<IndexType> &values) const; +
-template<std::size_t K, arithmetic T, typename ... Ts> -std::array<DataFrame, K> -get_data_by_kmeans(const char *col_name, - std::function<double(const T &x, const T &y)> &&dfunc = - [](const T &x, const T &y) -> double { - return ((x - y) * (x - y)); - }, - size_type num_of_iter = 1000, - seed_t seed = seed_t(-1)) const; -+
template<std::size_t K, arithmetic T, typename ... Ts> +std::array<DataFrame, K> +get_data_by_kmeans(const char *col_name, + std::function<double(const T &x, const T &y)> &&dfunc = + [](const T &x, const T &y) -> double { + return ((x - y) * (x - y)); + }, + size_type num_of_iter = 1000, + seed_t seed = seed_t(-1)) const; +
-template<std::size_t K, arithmetic T, typename ... Ts> -std::array<PtrView, K> -get_view_by_kmeans(const char *col_name, - std::function<double(const T &x, const T &y)> &&dfunc = - [](const T &x, const T &y) -> double { - return ((x - y) * (x - y)); - }, - size_type num_of_iter = 1000, - seed_t seed = seed_t(-1)); -+
template<std::size_t K, arithmetic T, typename ... Ts> +std::array<PtrView, K> +get_view_by_kmeans(const char *col_name, + std::function<double(const T &x, const T &y)> &&dfunc = + [](const T &x, const T &y) -> double { + return ((x - y) * (x - y)); + }, + size_type num_of_iter = 1000, + seed_t seed = seed_t(-1)); +
-template<std::size_t K, arithmetic T, typename ... Ts> -std::array<ConstPtrView, K> -get_view_by_kmeans(const char *col_name, - std::function<double(const T &x, const T &y)> &&dfunc = - [](const T &x, const T &y) -> double { - return ((x - y) * (x - y)); - }, - size_type num_of_iter = 1000, - seed_t seed = seed_t(-1)) const; -+
template<std::size_t K, arithmetic T, typename ... Ts> +std::array<ConstPtrView, K> +get_view_by_kmeans(const char *col_name, + std::function<double(const T &x, const T &y)> &&dfunc = + [](const T &x, const T &y) -> double { + return ((x - y) * (x - y)); + }, + size_type num_of_iter = 1000, + seed_t seed = seed_t(-1)) const; +
-template<StringOnly T, typename ... Ts> -DataFrame -get_data_by_like(const char *name, - const char *pattern, - bool case_insensitive = false, - char esc_char = '\\') const; -+
template<StringOnly T, typename ... Ts> +DataFrame +get_data_by_like(const char *name, + const char *pattern, + bool case_insensitive = false, + char esc_char = '\\') const; +
-template<StringOnly T, typename ... Ts> -PtrView -get_view_by_like(const char *name, - const char *pattern, - bool case_insensitive = false, - char esc_char = '\\'); -+
template<StringOnly T, typename ... Ts> +PtrView +get_view_by_like(const char *name, + const char *pattern, + bool case_insensitive = false, + char esc_char = '\\'); +
-template<StringOnly T, typename ... Ts> -ConstPtrView -get_view_by_like(const char *name, - const char *pattern, - bool case_insensitive = false, - char esc_char = '\\') const; -+
template<StringOnly T, typename ... Ts> +ConstPtrView +get_view_by_like(const char *name, + const char *pattern, + bool case_insensitive = false, + char esc_char = '\\') const; +
-template<StringOnly T, typename ... Ts> -DataFrame -get_data_by_like(const char *name1, - const char *name2, - const char *pattern1, - const char *pattern2, - bool case_insensitive = false, - char esc_char = '\\') const; -+
template<StringOnly T, typename ... Ts> +DataFrame +get_data_by_like(const char *name1, + const char *name2, + const char *pattern1, + const char *pattern2, + bool case_insensitive = false, + char esc_char = '\\') const; +
-template<StringOnly T, typename ... Ts> -PtrView -get_view_by_like(const char *name1, - const char *name2, - const char *pattern1, - const char *pattern2, - bool case_insensitive = false, - char esc_char = '\\'); -+
template<StringOnly T, typename ... Ts> +PtrView +get_view_by_like(const char *name1, + const char *name2, + const char *pattern1, + const char *pattern2, + bool case_insensitive = false, + char esc_char = '\\'); +
-template<StringOnly T, typename ... Ts> -ConstPtrView -get_view_by_like(const char *name1, - const char *name2, - const char *pattern1, - const char *pattern2, - bool case_insensitive = false, - char esc_char = '\\') const; -+
template<StringOnly T, typename ... Ts> +ConstPtrView +get_view_by_like(const char *name1, + const char *name2, + const char *pattern1, + const char *pattern2, + bool case_insensitive = false, + char esc_char = '\\') const; +
-template<comparable T, typename ... Ts> -DataFrame -get_top_n_data(const char *col_name, size_type n) const; -+
template<comparable T, typename ... Ts> +DataFrame +get_top_n_data(const char *col_name, size_type n) const; +
-template<comparable T, typename ... Ts> -PtrView -get_top_n_view(const char *col_name, size_type n); -+
template<comparable T, typename ... Ts> +PtrView +get_top_n_view(const char *col_name, size_type n); +
-template<comparable T, typename ... Ts> -ConstPtrView -get_top_n_view(const char *col_name, size_type n) const; -+
template<comparable T, typename ... Ts> +ConstPtrView +get_top_n_view(const char *col_name, size_type n) const; +
-template<comparable T, typename ... Ts> -DataFrame -get_bottom_n_data(const char *col_name, size_type n) const; -+
template<comparable T, typename ... Ts> +DataFrame +get_bottom_n_data(const char *col_name, size_type n) const; +
-template<comparable T, typename ... Ts> -PtrView -get_bottom_n_view(const char *col_name, size_type n); -+
template<comparable T, typename ... Ts> +PtrView +get_bottom_n_view(const char *col_name, size_type n); +
-template<comparable T, typename ... Ts> -ConstPtrView -get_bottom_n_view(const char *col_name, size_type n) const; -+
template<comparable T, typename ... Ts> +ConstPtrView +get_bottom_n_view(const char *col_name, size_type n) const; +