ium_464979/IUM_05-split.py
AWieczarek 25619cb914 IUM_7
2024-06-11 19:44:30 +02:00

10 lines
306 B
Python

import pandas as pd
from sklearn.model_selection import train_test_split
data = pd.read_csv('beer_reviews.csv')
train_data, test_data = train_test_split(data, test_size=0.2, random_state=42)
train_data.to_csv('beer_reviews_train.csv', index=False)
test_data.to_csv('beer_reviews_test.csv', index=False)