Answered step by step
Verified Expert Solution
Question
1 Approved Answer
import pandas as pd class ProgrammingLanguage: def __init__(self): self.df = pd.DataFrame() def read_data(self,file): df = pd.read_csv(file) df = df[df['type'] == 'p1'] columns_to_include = ['pldb_id', 'type',
import pandas as pd class ProgrammingLanguage: def __init__(self): self.df = pd.DataFrame() def read_data(self,file): df = pd.read_csv(file) df = df[df['type'] == 'p1'] columns_to_include = ['pldb_id', 'type', 'appeared', 'number_of_users', 'number_of_jobs', 'is_open_source'] df = df[columns_to_include] self.df = df def calculate_counts(self,col): counts = self.df[col].value_counts() return counts def generate_plot(self,col_x,col_y): plt.rcParams["figure.figsize"]=(10,5) fig=sns.scatterplot(x=col_x,y=col_y,data=self.df,color='#5E3C99',s=100) fig.tick_params(axis='both',which='major',labelsize=12) return fig
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