<jupyter_start><jupyter_text>From this we can see that the shape of our datas is in the form of 5000 rows and 25 columns<jupyter_code># Let's now inspect the datatypes
df.dtypes
non_missing = df.count() #Counts the number of non-missing values in the data frame
print('The total non-missing values: ',non_missing)
missing_values = np.count_nonzero(df.isnull())  # Counts the missing values in the dataframe
print('The total number of missing values:',missing_values)
df['Bluecar counter'].hist() # Histogram to visualise the Bluecar counter distribution
df['Utilib counter'].hist() # Histogram to visualise the Utilib counter distribution
df['Utilib 1.4 counter'].hist() # Histogram to visualise the Utilib 1.4 counter distribution
# Let's now drop the unwanted columns
df.drop(['Displayed comment','Scheduled at', 'month'], axis=1, inplace=True)
df.isnull().sum() # Check the sum of the missing values
df.shape
# Let's now remove the white spaces in the columns of the dataframe
df_columns = df.columns.str.replace(' ', '_')
df_columns
df['Kind'].unique()
df.sort_index()
df.head(7)
# Now lets create a new column that counts the total number of cars at a particular station
df['total_cars'] = df['Bluecar counter'] + df['Utilib 1.4 counter'] + df['Utilib counter']
df
# Let's find the most popular hour for returning cars
popular_hour = df.groupby(['hour'])['total_cars'].sum().sort_values(ascending=False)
popular_hour.head(1)<jupyter_output><empty_output><jupyter_text>From this we can ss that the most popular hour was at 6pm<jupyter_code># Let's now find the most popular station overally which is the one with the most number of vehicles.
popular_station = df.groupby(['Public name'])['total_cars'].sum().sort_values(ascending=False)
popular_station.head(1)<jupyter_output><empty_output><jupyter_text>We can see that the most popular station was 'Paris/Porte de Montrouge/8 ' with 50 cars overally.<jupyter_code># Let's now find the most popular picking station at the most popular hour
pop_picking_station = df.groupby(['Public name'])['hour'] == '6'
# Let's find most popular postcode for picking up blue cars
popular_postal = df.groupby(['Postal code'])['Bluecar counter'].sum().sort_values(ascending=True)
popular_postal.head(1)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11106214191273689, 'fraction_numerical': 0.009695901278096077, 'mean_word_length': 6.32258064516129, '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': '33099', 'license': 'MIT', 'n_tokens_mistral': 709, 'n_tokens_neox': 673, 'n_words': 246, 'path': 'Autolib_Analysis.ipynb', 'repo_name': '3HeadedSnake/DSP9-WEEK4', 'size': '2269'}