FilePrepper 0.2.0

dotnet add package FilePrepper --version 0.2.0                
NuGet\Install-Package FilePrepper -Version 0.2.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FilePrepper" Version="0.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FilePrepper --version 0.2.0                
#r "nuget: FilePrepper, 0.2.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install FilePrepper as a Cake Addin
#addin nuget:?package=FilePrepper&version=0.2.0

// Install FilePrepper as a Cake Tool
#tool nuget:?package=FilePrepper&version=0.2.0                

FilePrepper

FilePrepper�� �پ��� ������ ó�� �۾��� ������ �� �ִ� ������ ������ ��ȯ �� �м� ���̺귯���Դϴ�. �� ���̺귯���� �÷� ó��, �� ó��, ������ ��ȯ, �м�/����, ��-�� ���ڵ�, ���ø� ���� ���� �۾��� �����ϸ�, ����ڰ� ���� ���� �ɼ��� �����Ͽ� ������ ������������ ������ �� �ֵ��� �����ݴϴ�.

Dependency Packages

<PackageReference Include="CsvHelper" Version="33.0.1" />
<PackageReference Include="EPPlus" Version="7.5.2" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="9.0.0" />
<PackageReference Include="Scrutor" Version="5.1.1" />

Tasks

���� ��� ����
�÷� ó�� AddColumns ���ο� �÷��� �߰��Ͽ� ������ Ȯ��
RemoveColumns ���ʿ��� �÷� ����
RenameColumns �÷� �̸� ����
ReorderColumns �÷� ���� ����
ColumnInteraction �÷� �� ��ȣ�ۿ� ��� �� ���ο� ���� ����
�� ó�� FilterRows ���ǿ� �´� �� ���͸�
DropDuplicates �ߺ� �� ����
FillMissingValues ������ ��ü(���, �߾Ӱ�, ���� �� ��)
��ȯ DataTypeConvert ������ Ÿ�� ��ȯ
FileFormatConvert ���� ���� ��ȯ(CSV, JSON ��)
DateExtraction ��¥ �����Ϳ��� ����, ��, �� �� ����
NormalizeData ������ ����ȭ(������ ����)
ScaleData ������ �����ϸ�(ǥ��ȭ, �ּ�-�ִ� ��ȯ ��)
ValueReplace Ư�� �� ġȯ
�м�/���� Aggregate �����͸� �׷�ȭ�Ͽ� ���� ��� ����
BasicStatistics �⺻ ���(���, �л� ��) ���
Merge ���� �����ͼ� ����
��ȯ/ó�� OneHotEncoding ������ �����͸� ��-�� ���ڵ��� ��ȯ
���ø� DataSampling ������ ���ø����� �κ� ���� ����

���� �� �۾��� �ɼ� ���λ����� �����Ͽ� FilePrepper�� �پ��� ����� �����ϰ� Ȱ���� �� �ֽ��ϴ�.

AddColumns

�ɼ� �ʼ� ����
NewColumns �� �߰��� �÷� �̸��� �⺻���� �����ϴ� ��ųʸ�

RemoveColumns

�ɼ� �ʼ� ����
RemoveColumns �� ������ �÷� ���

RenameColumns

�ɼ� �ʼ� ����
RenameMap �� ���� �÷����� �� �̸����� ����

ReorderColumns

�ɼ� �ʼ� ����
Order �� ���ϴ� �÷� ���� ���

ColumnInteraction

�ɼ� �ʼ� ����
SourceColumns �� ���꿡 ����� �� �� �̻��� ���� �÷� ���
Operation �� ������ ���� Ÿ�� (Add, Subtract, Multiply, Divide, Concat, Custom)
OutputColumn �� ����� ������ ��� �÷� �̸�
CustomExpression ���Ǻ� Operation�� Custom�� �� �ʿ��� ����� ���� �����

FilterRows

�ɼ� �ʼ� ����
Conditions �� ���� ���� ���. �� ������ ColumnName, Operator, Value ����

DropDuplicates

�ɼ� �ʼ� ����
KeepFirst �ƴϿ� ù ��° �߰ߵ� �ߺ� �����͸� �������� ���� (�⺻��: true)
SubsetColumnsOnly �ƴϿ� Ư�� �÷��� �������� �ߺ� üũ���� ���� (�⺻��: false)
TargetColumns ���Ǻ� SubsetColumnsOnly true ��, �ߺ� üũ�� ����� �÷� ���

FillMissingValues

�ɼ� �ʼ� ����
FillMethods �� �÷��� ������ ��ü ��� ���. �� �׸��� ColumnName, Method, FixedValue ����
TargetColumns �ƴϿ� ��ӹ��� ��� �÷� ���. FillMethods�� ���� �ڵ����� ������Ʈ��

DataTypeConvert

�ɼ� �ʼ� ����
Conversions �� ��ȯ�� �÷� ��� �� ����. �� �׸��� ColumnName, TargetType, DateTimeFormat, DefaultValue, Culture, TrimWhitespace, IgnoreCase ����

FileFormatConvert

�ɼ� �ʼ� ����
TargetFormat �� ��� ���� ���� (CSV, TSV, PSV, JSON, XML)
Encoding �ƴϿ� ���� ���ڵ� ����
Delimiter �ƴϿ� ������. CSV/TSV/PSV ���Ŀ����� ���� �Ұ�
HasHeader �ƴϿ� ��� ���� ���� (�⺻��: true)
DateTimeFormat �ƴϿ� ��¥/�ð� ����
PrettyPrint �ƴϿ� JSON/XML ��� �� �������� ���� �鿩���� ���� (�⺻��: false)
RootElementName �ƴϿ� XML ��� �� ��Ʈ ������Ʈ �̸�
ItemElementName �ƴϿ� XML ��� �� ������ ������Ʈ �̸�

DateExtraction

�ɼ� �ʼ� ����
Extractions �� ��¥ ���� ���� ���. �� �׸��� SourceColumn, DateFormat, Culture, Components, OutputColumnTemplate ����

NormalizeData

�ɼ� �ʼ� ����
TargetColumns �� ����ȭ�� �÷� ���
Method �� ����ȭ ��� (MinMax �Ǵ� ZScore)
MinValue ���Ǻ� MinMax ��� �� �ּҰ�
MaxValue ���Ǻ� MinMax ��� �� �ִ밪

ScaleData

�ɼ� �ʼ� ����
ScaleColumns �� �����ϸ��� �÷� �� ��� ���. �� �׸��� ColumnName, Method ����
TargetColumns �ƴϿ� ��ӹ��� ��� �÷� ���. ScaleColumns�� ���� ������

ValueReplace

�ɼ� �ʼ� ����
ReplaceMethods �� ġȯ ��Ģ ���. �� �׸��� ColumnName, Replacements (ġȯ ��) ����
TargetColumns �ƴϿ� ��ӹ��� ��� �÷� ���. ReplaceMethods�� ���� ������

Aggregate

�ɼ� �ʼ� ����
GroupByColumns �� �׷�ȭ�� ����� �÷� ���
AggregateColumns �� ���� ���� ���. �� �׸��� ColumnName, Function, OutputColumnName ����

BasicStatistics

�ɼ� �ʼ� ����
TargetColumns �� ��� ��� ��� �÷� ���
Statistics �� ����� ��� ���� �迭 (Mean, StdDev ��)
Suffix �� ��� �÷���� ���� ���̻�

Merge

�ɼ� �ʼ� ����
InputPaths �� ������ ���� ��� ��� (�ּ� 2�� �̻� �ʿ�)
MergeType �� ���� ���� (Vertical �Ǵ� Horizontal)
JoinType �ƴϿ� Horizontal Merge �� ����� ���� ���� (Inner, Left, Right, Full)
JoinKeyColumns ���Ǻ� Horizontal Merge ��, ���� Ű�� ����� �÷� ���

DataSampling

�ɼ� �ʼ� ����
Method �� ���ø� ��� (Random, Systematic, Stratified)
SampleSize �� ���� ũ�� (���� �Ǵ� ���밪). 0���� Ŀ�� ��
Seed �ƴϿ� ���� ������ ���� �õ� ��
StratifyColumn ���Ǻ� Stratified ��� �� ��ȭ ���� �÷�
SystematicInterval ���Ǻ� Systematic ��� �� ���ø� ����

FilePrepper CLI

FilePrepper CLI�� ����ٿ��� FilePrepper�� ��� ������ ó�� ����� ����� �� �ְ� ���ִ� �����Դϴ�.

��ġ

dotnet tool install --global FilePrepper.CLI

�⺻ ����

��� ��ɾ�� ������ ���� �⺻ ������ �����ϴ�:

fileprepper <command> -i <input-file> -o <output-file> [options]

���� �ɼ�

��� ��ɾ�� ����� �� �ִ� ���� �ɼ�:

�ɼ� �ʼ� ����
-i, --input �� �Է� ���� ���
-o, --output �� ��� ���� ���
--ignore-errors �ƴϿ� ó�� �� ���� �߻� �� ���� (�⺻��: false)
--default-value �ƴϿ� ���� �߻� �� ����� �⺻��

��ɾ� ���

�÷� �߰�
# ���ο� �÷� �߰�
fileprepper add-columns -i input.csv -o output.csv -c "NewCol1=Value1,NewCol2=Value2"
�÷� ����
# Ư�� �÷� ����
fileprepper remove-columns -i input.csv -o output.csv -c "Column1,Column2"
�÷� �̸� ����
# �÷� �̸� ����
fileprepper rename-columns -i input.csv -o output.csv -m "OldName1:NewName1,OldName2:NewName2"
�÷� ���� ����
# �÷� ���� ���ġ
fileprepper reorder-columns -i input.csv -o output.csv -o "Column1,Column2,Column3"
�÷� �� ����
# �÷� �� ���� ����
fileprepper column-interaction -i input.csv -o output.csv -s "Price,Quantity" -t Multiply -o "Total"

# ����� ���� ����� ���
fileprepper column-interaction -i input.csv -o output.csv -s "Price,Quantity,Discount" -t Custom -o "FinalPrice" -e "($1 * $2) * (1 - $3)"
�� ���͸�
# ���ǿ� ���� �� ���͸�
fileprepper filter-rows -i input.csv -o output.csv -c "Age:GreaterThan:30,Salary:LessThan:50000"
�ߺ� ����
# ��� �÷� ���� �ߺ� ����
fileprepper drop-duplicates -i input.csv -o output.csv

# Ư�� �÷� ���� �ߺ� ����
fileprepper drop-duplicates -i input.csv -o output.csv --subset-only -c "Name,Department"
������ ó��
# ������ ��ü
fileprepper fill-missing -i input.csv -o output.csv -m "Age:Mean,Salary:Median,Status:FixedValue:Unknown"
������ Ÿ�� ��ȯ
# ������ Ÿ�� ��ȯ
fileprepper convert-type -i input.csv -o output.csv -c "Date:DateTime:yyyy-MM-dd,Age:Integer,Salary:Decimal"
���� ���� ��ȯ
# CSV�� JSON���� ��ȯ
fileprepper convert-format -i input.csv -o output.json -t JSON --pretty

# CSV�� XML�� ��ȯ
fileprepper convert-format -i input.csv -o output.xml -t XML --root "Records" --item "Record"
��¥ ������ ����
# ��¥ ������Ʈ ����
fileprepper extract-date -i input.csv -o output.csv -e "OrderDate:Year,Month,Day:yyyy-MM-dd"
������ ����ȭ
# MinMax ����ȭ
fileprepper normalize -i input.csv -o output.csv -c "Salary,Age" -m MinMax --min 0 --max 1

# Z-Score ����ȭ
fileprepper normalize -i input.csv -o output.csv -c "Salary,Age" -m ZScore
������ �����ϸ�
# ������ �����ϸ�
fileprepper scale -i input.csv -o output.csv -s "Price:MinMax,Score:Standardization"
�� ġȯ
# �� ġȯ
fileprepper replace -i input.csv -o output.csv -r "Status:active=1;inactive=0,Gender:M=Male;F=Female"
������ ����
# �׷캰 ����
fileprepper aggregate -i input.csv -o output.csv -g "Department,Year" -a "Salary:Sum:TotalSalary,Age:Average:AvgAge"

# ���� ����� ������ �߰�
fileprepper aggregate -i input.csv -o output.csv -g "Department" -a "Salary:Sum:TotalSalary" --append
�⺻ ��� ���
# ��� ���
fileprepper stats -i input.csv -o output.csv -c "Salary,Age" -s "Mean,StandardDeviation,Min,Max,Median"
���� ����
# ���� ���� (�� �߰�)
fileprepper merge -i main.csv -o output.csv --inputs "data2.csv,data3.csv" -t Vertical

# ���� ���� (����)
fileprepper merge -i main.csv -o output.csv --inputs "data2.csv" -t Horizontal -j Left -k "ID,Department"
��-�� ���ڵ�
# ������ ���� ��-�� ���ڵ�
fileprepper one-hot-encoding -i input.csv -o output.csv -c "Category,Status" --drop-first
������ ���ø�
# ���� ���ø�
fileprepper data-sampling -i input.csv -o output.csv -m Random -s 0.3 --seed 42

# ��ȭ ���ø�
fileprepper data-sampling -i input.csv -o output.csv -m Stratified -s 0.3 --stratify "Category"

���� ó��

  • ��� ��ɾ�� ���� �� 0, ���� �� 1�� ��ȯ�մϴ�.
  • ���� �߻� �� �ڼ��� ���� �޽����� stderr�� ��µ˴ϴ�.
  • --ignore-errors �ɼ��� ����ϸ� ó�� �� �߻��ϴ� ������ �����ϰ� ��� �����մϴ�.

���� ���ǻ���

  1. ���� ��ο� ������ ���Ե� ��� ����ǥ�� �����ּ���:
fileprepper add-columns -i "input file.csv" -o "output file.csv" -c "NewCol=Value"
  1. ���� ���� ������ ���� ��ǥ(,)�� �����մϴ�.

  2. ������ ���̳� Ư�����ڰ� ���Ե� ��� ������ �̽��������ϰų� ����ǥ�� �����ּ���.

  3. ��뷮 ���� ó�� �ÿ��� ����� �޸𸮸� Ȯ���ϼ���.

  4. ó�� �� �׻� �Է� ������ ����ϴ� ���� �����մϴ�.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.2.0 71 1/11/2025
0.1.1 97 12/16/2024
0.1.0 96 12/6/2024