<jupyter_start><jupyter_text>Preparando el espacio de trabajo<jupyter_code>import pandas as pd
pd.__version__<jupyter_output><empty_output><jupyter_text>Inicializando los dataframes de pruebas<jupyter_code>df_left = pd.DataFrame(
    {'X':['x0','x1','x2','x3'],
    'W':['w0','w1','w2','w3'],
    'Y':['y0','y1','y2','y3'],
    'Mix':['y2','y3','a2','a3']},
    index = ['y2','y3','a2','a3'])

df_left
df_right = pd.DataFrame(
    {'Z':['z2','z3','z4','z5'],
     'A':['a2','a3','a4','a5'],
     'Y':['y2','y3','y4','y5']},
    index = [2,3,4,5])

df_right
pd.merge(df_left,df_right)<jupyter_output><empty_output><jupyter_text>Tipos de merge* Inner```pythonpd.merge(df_left,df_right, how='inner')```* Outer```pythonpd.merge(df_left,df_right, how='outer')```* Left```pythonpd.merge(df_left,df_right, how='left')```* Right```pythonpd.merge(df_left,df_right, how='right')```Sólo sería necesario cambiar el parámetro How<jupyter_code>pd.merge(df_left,df_right, how='inner', on='Y')
pd.merge(df_left,df_right, how='inner', left_on='Mix', right_on='Y', suffixes=['_left','_right'])
pd.merge(df_left,df_right, how='inner', left_on='Mix', right_on='A')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.2512776831345826, 'fraction_numerical': 0.030664395229982964, 'mean_word_length': 9.491071428571429, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '630782', 'license': 'MIT', 'n_tokens_mistral': 521, 'n_tokens_neox': 509, 'n_words': 57, 'path': 'manipulacion_datos_pandas/9_merge.ipynb', 'repo_name': 'cristian-rincon/escuela-datascience', 'size': '1174'}