pascalabcnet/InstallerSamples/MachineLearning/02_DataFrame/df28.pas
Mikhalkovich Stanislav 74f69500fa m.Print - исправлен вывод
DataFrame - Stats, Describe

Примеры на датафрейм
2026-06-21 22:17:43 +03:00

27 lines
469 B
ObjectPascal
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

uses MLABC;
begin
var text := '''
id,created_at,name
1,15.01.2023,Alice
2,16.01.2024 12:30:00,Bob
3,20.02.2023,Charlie
4,05.03.2024 09:15:00,Diana
''';
var df := DataFrame.FromCsvText(text);
var df2 := df.WithColumnInt(
'year',
cur -> cur.DateTime('created_at').Year
);
var grouped := df2.GroupBy('year').Count;
Println('DataFrame с колонкой year:');
df2.Print;
Println;
Println('GroupBy(year).Count:');
grouped.Print;
end.