Question
Python: I have a data set that I have cleaned and written a bunch of code for. I am not looking to change or redo
Python: I have a data set that I have cleaned and written a bunch of code for. I am not looking to change or redo that. I came up with 2 questions that I want to answer with the data and am unsure how to write it. Any help is appreciated! I am unsure how to attach the csv file. I am happy to send it if you are able to help. The questions are:
Do companies with more reviews have more job opportunities?
Do job opportunities increased vary by location?
Here is the code:
import pandas as pd
import numpy as np
#import csv file into panda dataframe
df = pd.read_csv("datascience_jobs.csv")
#create a new dataframe and drop any row with a na value
newdf = df.dropna(axis = 0, how='any')
#rename dataframe
joblst = newdf
df.columns.get_values()
#grouping data by columns
company = newdf.groupby('Company')
company.size()
#group company data by most positions available
company = newdf.groupby('Company')
companycount = company.size().to_frame()
companycount = companycount.sort_values(0,ascending = False)
# group location
location = newdf.groupby('Location')
location = [row.rstrip() for row in joblst['Location']]
newlocation = pd.Series(location, index = joblst.index)
def unique(list1):
x = np.array(list1)
print(np.unique(x))
newlocation = pd.unique(location)
newlocation
result = joblst.stack()
result
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started