<jupyter_start><jupyter_text>2-feature-engineering Dane pochodzą z:* https://www.kaggle.com/austinreese/craigslist-carstrucks-data* https://github.com/AustinReese/UsedVehicleSearch<jupyter_code>df = pd.read_csv('../data/interim/vehicles.csv')
df.info()
df['year'] = 2020 - df['year']  # Zmiana na wiek
df['year'].describe()
df.shape
dfs = [df]
to_delete = list()
for col in df.select_dtypes('object'):
    dfs.append(pd.get_dummies(df[[col]], drop_first=True))
    to_delete.append(col)
df = pd.concat(dfs, axis=1)
df.drop(to_delete, axis=1, inplace=True)
sorted(df.columns)
df.shape
df.info()
df.to_csv('../data/processed/vehicles.csv', index=False)
del df<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1804949053857351, 'fraction_numerical': 0.010189228529839884, 'mean_word_length': 6.020408163265306, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '654442', 'license': 'MIT', 'n_tokens_mistral': 288, 'n_tokens_neox': 280, 'n_words': 40, 'path': 'notebooks/2-feature-engineering.ipynb', 'repo_name': 'besiobu/used-cars', 'size': '687'}