<jupyter_start><jupyter_text>Join the two dataframes along rows and assign all_data<jupyter_code>all_data = pd.concat([data1, data2])
all_data<jupyter_output><empty_output><jupyter_text>Join the two dataframes along columns and assing to all_data_col<jupyter_code>all_data_col = pd.concat([data1, data2], axis =1)
all_data_col
data3<jupyter_output><empty_output><jupyter_text>Merge all_data and data3 along the subject_id value<jupyter_code>pd.merge(all_data, data3, on='subject_id') # Bran is not included with subject_id 6 ; default: inner<jupyter_output><empty_output><jupyter_text>Merge only the data that has the same 'subject_id' on both data1 and data2<jupyter_code>pd.merge(data1, data2, on='subject_id', how='inner') # intersection<jupyter_output><empty_output><jupyter_text>Merge all values in data1 and data2, with matching records from both sides where available<jupyter_code>pd.merge(data1, data2, on='subject_id', how='outer') # union
pd.merge(data1, data2, on='subject_id', how='left')
pd.merge(data1, data2, on='subject_id', how='right')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11265004616805172, 'fraction_numerical': 0.019390581717451522, 'mean_word_length': 9.732673267326733, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '664045', 'license': 'MIT', 'n_tokens_mistral': 389, 'n_tokens_neox': 386, 'n_words': 88, 'path': 'Exercise11.ipynb', 'repo_name': 'luckyrabbit85/Pandas-Exercise', 'size': '1083'}