<jupyter_start><jupyter_text>FNC - FakeNewsChallengeLink: [https://github.com/FakeNewsChallenge/fnc-1](https://github.com/FakeNewsChallenge/fnc-1)This jupyter notebook covers descriptive analysis of **FNC - FakeNewsChallenge** dataset. **Note:** Repository contains more files, train, test and competition test files. In this analysis, we will analyse just **train** dataset. Attributes* **headline** - headline of the new* **body** - body of the new* **stance**:    * unrelated    * discuss    * agree    * disagree  Setup and import libraries<jupyter_code>import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns<jupyter_output><empty_output><jupyter_text>Read the dataBecause data are divided into two files (stances and bodies of the news are separated), we need to join them:<jupyter_code># read both files
df_bodies = pd.read_csv('data/train_bodies.csv')
df_stances = pd.read_csv('data/train_stances.csv')

# let's merge both files
df = pd.merge(df_stances, df_bodies, on='Body ID')<jupyter_output><empty_output><jupyter_text>Analysis Count of records<jupyter_code>len(df)<jupyter_output><empty_output><jupyter_text>Data examples<jupyter_code>df.head()<jupyter_output><empty_output><jupyter_text>More information about data<jupyter_code>df.info()
df.describe(include='all')<jupyter_output><empty_output><jupyter_text>NaN valuesAre there any NaN values in our data?<jupyter_code>df.isnull().values.any()<jupyter_output><empty_output><jupyter_text>Let's look at NaN values per each column:<jupyter_code>df.isnull().sum().plot(kind='bar', ylim=(0, len(df)), title='NaN values per column')<jupyter_output><empty_output><jupyter_text>Attributes analysis What is the distribution of fake news labels in our data?<jupyter_code>df['Stance'].value_counts().plot(kind='bar', title='Distribution of labels')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12098501070663811, 'fraction_numerical': 0.0016059957173447537, 'mean_word_length': 7.816037735849057, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 2, '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': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '544903', 'license': 'MIT', 'n_tokens_mistral': 633, 'n_tokens_neox': 613, 'n_words': 148, 'path': 'fake_news/fake_news_challenge/fake_news_challenge.ipynb', 'repo_name': 'sindhu000018/fake-news-datasets', 'size': '1868'}