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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!