CSV

io.github.quafadas.scautable.CSV
object CSV

Attributes

Experimental
true
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
CSV.type

Members list

Type members

Types

type AllAreColumns[T <: Tuple, K <: Tuple] = T match { case EmptyTuple => true case head *: tail => IsColumn[head, K] match { case true => AllAreColumns[tail, K] case false => false } }
type Concat[X <: String, Y <: Tuple] = X *: Y
type ConcatSingle[X, A] = X *: A *: EmptyTuple
type DropAfterName[T, StrConst <: String] = T match { case EmptyTuple => EmptyTuple case head *: tail => IsMatch[StrConst, head] match { case true => EmptyTuple case false => head *: DropAfterName[tail, StrConst] } }
type DropOneName[T, StrConst <: String] = T match { case EmptyTuple => EmptyTuple case head *: tail => IsMatch[StrConst, head] match { case true => DropOneName[tail, StrConst] case false => head *: DropOneName[tail, StrConst] } }
type DropOneTypeAtName[N <: Tuple, StrConst <: String, T <: Tuple] = (N, T) match { case (EmptyTuple, _$16) => EmptyTuple case (_$17, EmptyTuple) => EmptyTuple case (nameHead *: nameTail, typeHead *: typeTail) => IsMatch[nameHead, StrConst] match { case true => typeTail case false => typeHead *: DropOneTypeAtName[nameTail, StrConst, typeTail] } }
type GetTypeAtName[N <: Tuple, StrConst <: String, T <: Tuple] = (N, T) match { case (EmptyTuple, _$18) => EmptyTuple case (_$19, EmptyTuple) => EmptyTuple case (nameHead *: nameTail, typeHead *: typeTail) => IsMatch[nameHead, StrConst] match { case true => typeHead case false => GetTypeAtName[nameTail, StrConst, typeTail] } }
type GetTypesAtNames[N <: Tuple, ForNames <: Tuple, T <: Tuple] = ForNames match { case EmptyTuple => EmptyTuple case nameHead *: nameTail => GetTypeAtName[N, nameHead, T] *: GetTypesAtNames[N, nameTail, T] }
type IsColumn[StrConst <: String, T <: Tuple] = T match { case EmptyTuple => false case head *: tail => IsMatch[StrConst, head] match { case true => true case false => IsColumn[StrConst, tail] } case Any => false }
type IsMatch[A <: String, B <: String] = B match { case A => true case Any => false }
type IsNumeric[T] = T match { case Option[a] => IsNumeric[a] case Int => true case Long => true case Float => true case Double => true case Any => false }
type Negate[T <: Tuple] = T match { case EmptyTuple => EmptyTuple case head *: tail => head match { case false => true *: Negate[tail] case true => false *: Negate[tail] } }
type NumericColsIdx[T <: Tuple] = T match { case EmptyTuple => EmptyTuple case head *: tail => IsNumeric[head] match { case true => true *: NumericColsIdx[tail] case false => false *: NumericColsIdx[tail] } }
type ReReverseXLL[t] = Size[t] match { case 0 => EmptyTuple case 1 => t case 2 => t case 3 => t case 4 => t case 5 => t case 6 => t case 7 => t case 8 => t case 9 => t case 10 => t case 11 => t case 12 => t case 13 => t case 14 => t case 15 => t case 16 => t case 17 => t case 18 => t case 19 => t case 20 => t case 21 => t case 22 => t case Any => ReverseTuple[t] }
type ReplaceOneName[T <: Tuple, StrConst <: String, A <: String] = T match { case EmptyTuple => EmptyTuple case nameHead *: nameTail => IsMatch[nameHead, StrConst] match { case true => A *: nameTail case false => nameHead *: ReplaceOneName[nameTail, StrConst, A] } }
type ReplaceOneTypeAtName[N <: Tuple, StrConst <: String, T <: Tuple, A] = (N, T) match { case (EmptyTuple, _$14) => EmptyTuple case (_$15, EmptyTuple) => EmptyTuple case (nameHead *: nameTail, typeHead *: typeTail) => IsMatch[nameHead, StrConst] match { case true => A *: typeTail case false => typeHead *: ReplaceOneTypeAtName[nameTail, StrConst, typeTail, A] } }
type ReverseTuple[T <: Tuple] = T match { case EmptyTuple => EmptyTuple case x *: xs => ReverseTuple[xs] *: x }
type SelectFromTuple[T <: Tuple, Bools <: Tuple] = T match { case EmptyTuple => EmptyTuple case head *: tail => Bools match { case true *: boolTail => head *: SelectFromTuple[tail, boolTail] case false *: boolTail => SelectFromTuple[tail, boolTail] } }
type Size[T] = T match { case EmptyTuple => 0 case x *: xs => 1 + Size[xs] }
type StringifyTuple[T >: Tuple] = T match { case EmptyTuple => EmptyTuple case head *: tail => NamedTuple[Tuple1["head"], Tuple1[String]] *: StringifyTuple[tail] }
type StringyTuple[T <: Tuple] = T match { case EmptyTuple => EmptyTuple case head *: tail => String *: StringyTuple[tail] }
type Tail[T <: Tuple, S <: String] = T match { case EmptyTuple => EmptyTuple case head *: tail => IsMatch[S, head] match { case true => EmptyTuple case false => Tail[tail, S] } }
type TupleContainsIdx[Search <: Tuple, In <: Tuple] = In match { case EmptyTuple => EmptyTuple case head *: tail => Search match { case EmptyTuple => false *: EmptyTuple case searchHead *: searchTail => IsColumn[head, Search] match { case true => true *: TupleContainsIdx[Search, tail] case false => false *: TupleContainsIdx[Search, tail] } } }

Value members

Concrete methods

transparent inline def absolutePath[T](inline path: String): CsvIterator[_]
inline def constValueAll[A]: A
def listToTuple[A](list: List[A]): Tuple
transparent inline def pwd[T](inline path: String): CsvIterator[_]
def readCsvAbolsutePath(pathExpr: Expr[String])(using Quotes): Expr[CsvIterator[_]]
transparent inline def resource[T](inline path: String): CsvIterator[_]
transparent inline def url[T](inline path: String): CsvIterator[_]

Givens

Givens

given IteratorToExpr2[K](using x$1: ToExpr[String], x$2: Type[K]): IteratorToExpr2[K]

Extensions

Extensions

extension [K, V, K1 <: Tuple & K, V1 <: Tuple & K](itr: Iterator[NamedTuple[K1, V1]])
inline def addColumn[S <: String, A](fct: NamedTuple[K1, V1] => A): Iterator[NamedTuple[S *: K1, A *: V1]]
inline def column[S <: String](using ev: IsColumn[S, K1] =:= true, s: ValueOf[S]): Iterator[GetTypeAtName[K1, S, V1]]
inline def columns[ST <: Tuple](using ev: AllAreColumns[ST, K1] =:= true): Iterator[NamedTuple[SelectFromTuple[K1, TupleContainsIdx[ST, K1]], GetTypesAtNames[K1, SelectFromTuple[K1, TupleContainsIdx[ST, K1]], V1]]]
inline def dropColumn[S <: String](using ev: IsColumn[S, K1] =:= true, s: ValueOf[S]): Iterator[NamedTuple[DropOneName[K1, S], DropOneTypeAtName[K1, S, V1]]]
inline def forceColumnType[S <: String, A]: Iterator[NamedTuple[K1, ReplaceOneTypeAtName[K1, S, V1, A]]]
inline def mapColumn[S <: String, A](fct: GetTypeAtName[K1, S, V1] => A)(using ev: IsColumn[S, K1] =:= true, s: ValueOf[S]): Iterator[NamedTuple[K1, ReplaceOneTypeAtName[K1, S, V1, A]]]
inline def numericColSummary[S <: String](using ev: IsColumn[S, K1] =:= true, isNum: IsNumeric[GetTypeAtName[K1, S, V1]] =:= true, s: ValueOf[S], a: Fractional[GetTypeAtName[K1, S, V1]]): NamedTuple[("mean", "std", "min", "25%", "50%", "75%", "max"), (GetTypeAtName[K1, S, V1], Double, GetTypeAtName[K1, S, V1], Double, Double, Double, GetTypeAtName[K1, S, V1])]
inline def renameColumn[From <: String, To <: String](using ev: IsColumn[From, K1] =:= true, FROM: ValueOf[From], TO: ValueOf[To]): Iterator[NamedTuple[ReplaceOneName[K1, From, To], V1]]
inline def resolve[ST <: Tuple]: SelectFromTuple[K1, TupleContainsIdx[ST, K1]]
inline def resolveNT[ST <: Tuple]: NamedTuple[SelectFromTuple[K1, TupleContainsIdx[ST, K1]], GetTypesAtNames[K1, SelectFromTuple[K1, TupleContainsIdx[ST, K1]], V1]]
inline def resolveT[ST <: Tuple]: GetTypesAtNames[K1, SelectFromTuple[K1, TupleContainsIdx[ST, K1]], V1]
extension [K <: Tuple, V <: Tuple](nt: Seq[NamedTuple[K, V]])
inline def addColumn[S <: String, A](fct: NamedTuple[K, V] => A): Seq[NamedTuple[S *: K, A *: V]]
inline def columns[ST <: Tuple](using ev: AllAreColumns[ST, K] =:= true): Seq[NamedTuple[SelectFromTuple[K, TupleContainsIdx[ST, K]], GetTypesAtNames[K, SelectFromTuple[K, TupleContainsIdx[ST, K]], V]]]
inline def dropColumn[S <: String](using ev: IsColumn[S, K] =:= true, s: ValueOf[S]): Seq[NamedTuple[DropOneName[K, S], DropOneTypeAtName[K, S, V]]]
inline def forceColumnType[S <: String, A]: Any
inline def mapColumn[S <: String, A](fct: GetTypeAtName[K, S, V] => A)(using ev: IsColumn[S, K] =:= true, s: ValueOf[S]): Seq[NamedTuple[K, ReplaceOneTypeAtName[K, S, V, A]]]
inline def renameColumn[From <: String, To <: String](using ev: IsColumn[From, K] =:= true, FROM: ValueOf[From], TO: ValueOf[To]): Seq[NamedTuple[ReplaceOneName[K, From, To], V]]