<jupyter_start><jupyter_text>1. Create a new colum<jupyter_code>import pandas as pd
df = pd.read_csv("stock.csv")
df.head()
print("\nA column is created by assigning it in relation\n",'-'*75, sep='') 

df['New'] = df['Price'] + df['Price'] 

df['New (Sum of X and Z)'] = df['New'] + df['Price']

print(df)<jupyter_output>A column is created by assigning it in relation
---------------------------------------------------------------------------
   Symbol  Price  New  New (Sum of X and Z)
0     MMM    100  200                   300
1     AOS    101  202                   303
2     ABT    102  204                   306
3    ABBV    103  206                   309
4     ACN    104  208                   312
5    ATVI    105  210                   315
6     AYI    106  212                   318
7    ADBE    107  214                   321
8     AAP    108  216                   324
9     AMD    109  218                   327
10    AES    110  220                   330
11    AET    111  222                   333
12    AMG    112  224                   336
13    AFL    113  226                   339
14      A    114  228                   342
15    APD    115  230                   345
16   AKAM    116  232                   348
17    ALK    117  234                   351
18    ALB    118  236                  [...]
{'fraction_non_alphanumeric': 0.11169811320754718, 'fraction_numerical': 0.150188679245283, 'mean_word_length': 0.8189300411522634, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '442234', 'license': 'MIT', 'n_tokens_mistral': 514, 'n_tokens_neox': 361, 'n_words': 144, 'path': 'Chapter03/.ipynb_checkpoints/Exercise 41-checkpoint.ipynb', 'repo_name': 'arifmudi/The-Data-Wrangling-Workshop', 'size': '1325'}