Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions data_analyis.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.preprocessing import LabelEncoder

def load_data(file_path):
"""Load data from a CSV file."""
Expand Down Expand Up @@ -40,6 +41,8 @@ def analyze_data(data):
def main():
file_path = input("Enter the path to the CSV file: ")
data = load_data(file_path)
label_encoder = LabelEncoder()
data['catagorical_encoded'] = label_encoder.fit_transform(data['int'])
analyze_data(data)

if __name__ == "__main__":
Expand Down