Skip to main content

Command Palette

Search for a command to run...

Project 2

Published
•1 min read•View as Markdown
I

I am Junior Data Scientist, using python for my analysis and modelling. I have few projects i have worked on and I'm loving this process. I'm open to working with anyone willing to help me through this process.

import pandas as pd
import csv

data = {
"Name": ["Alex", "Samantha", "Michael", "Emily", "Jacob", "Sophia", "William", "Ava", "Ethan", "Isabella", "Daniel", "Olivia", "Matthew", "Emma", "David", "Charlotte", "Andrew", "Mia", "James", "Amelia", "Joseph", "Harper", "Benjamin", "Abigail", "Ryan", "Emily", "Alexander", "Elizabeth", "Nathan", "Sofia"],
"Age": [28, 22, 35, 31, 26, 24, 39, 28, 33, 30, 29, 25, 34, 26, 38, 27, 36, 24, 32, 29, 37, 28, 30, 23, 31, 25, 34, 27, 36, 29],
"Height": ["170cm", "165cm", "180cm", "160cm", "175cm", "162cm", "185cm", "168cm", "178cm", "163cm", "170cm", "166cm", "183cm", "161cm", "179cm", "164cm", "182cm", "166cm", "174cm", "160cm", "177cm", "169cm", "176cm", "165cm", "171cm", "163cm", "179cm", "167cm", "181cm", "164cm"],
"State": ["California", "Texas", "New York", "Florida", "Illinois", "Georgia", "Washington", "California", "Massachusetts", "California", "Texas", "New York", "Florida", "Illinois", "Georgia", "Washington", "California", "Massachusetts", "California", "Texas", "New York", "Florida", "Illinois", "Georgia", "Washington", "California", "Massachusetts", "California", "Texas", "New York"]
}

data = pd.DataFrame(data)
data.to_csv("mydata.csv")

print(data.head())


# Reading csv

df = pd.read_csv("mydata.csv")

print(df)