<jupyter_start><jupyter_text>Web Design Challenge<jupyter_code>import pandas as pd
import datetime
# import csv to dataframe
cities = pd.read_csv("Resources/cities.csv")
cities.head()
# reorganize the column order
cities = cities[["City_ID", "City", "Country", "Lat", "Lng", "Date","Max Temp", "Humidity", "Cloudiness", "Wind Speed"]]
cities.head()
cities.dtypes
# convert unix timestamp to datetime
cities['Date'] = pd.to_datetime(cities['Date'],unit='s')
cities.head()
# change datetime to Y-m-d format
cities['Date'] = cities['Date'].dt.strftime('%Y-%m-%d')
cities.head()
cities.dtypes
# export df to html table
cities.to_html('table.html')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.17087667161961367, 'fraction_numerical': 0.0, 'mean_word_length': 7.120481927710843, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '480381', 'license': 'ADSL', 'n_tokens_mistral': 245, 'n_tokens_neox': 239, 'n_words': 56, 'path': 'WebVisualizations/city_csv_to_html.ipynb', 'repo_name': 'daviddamon/Web-Design-Challenge', 'size': '673'}