Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases In Networked Information Systems 6th International Workshop Dnis 2010 Aizu Wakamatsu Japan March 2010 Proceedings Lncs 5999

Authors: Shinji Kikuchi ,Shelly Sachdeva ,Subhash Bhalla

2010th Edition

3642120377, 978-3642120374

More Books

Students also viewed these Databases questions

Question

do it with opencv python - cv 2

Answered: 1 week ago

Question

1. Which position would you take?

Answered: 1 week ago