Today, Let's discuss about the various pandas functions that you should know and will be used if you are using python as a data analyst.
If you decide to learn python in order to perform data analysis such as creating automated scripts and various other things, then you must know these functions as you will end up using them daily.
So, let's discuss them one by one. Also, I will be comparing each function with corresponding SQL function/keyword so that if you know SQL, It will be easier for you to understand it.
1) head(n): It will allow you to fetch first "n" number of rows from the dataframe.
2) tail(n): It is opposite to head(n). It just allows you to get last "n"number of rows from the dataframe.
3) groupby(): It is used to group the data according to your need. SQL has this exact keyword as well.
4) sort_values(by='column', ascending=True/False): It is to sort the dataframe/result according to the need. It is similar to "order by" in SQL.
5) query(): It can be used to perform filtering according to the requirement. It is similar to where clause in SQL.
6) len(df): It can be used to get the count of rows of the dataframe. It is similar to "count" function in SQL.
7) merge(): It can be used to perform merging of multiple dataframe like a SQL join.
8) dropna(): It can be used to remove/drop the data that is missing. You can use use SQL to filter the values that are not null by using "NOT NULL" in where clause or you can use "ALTER","DELETE" to update or delete the null values in SQL.
9) fillna(): It can be used to fill the missing values. It is similar to "IFNULL', "Coalesce" in SQL.
10) df['column'].rank(method = 'dense', ascending = TRUE/FALSE): It is to perform dense rank operation that is present in SQL. It simply performs rank operation by not leaving gap in case of tie. So, if two data points had 1st as rank then the next data points will be provided with rank 2.
11) to_datetime(): It can be used to change the datatype of the column to "datetime". You can use "CAST()" and "CONVERT()" in SQL for similar operation.
So, these are the few pandas function that you should know to become a good data analyst that uses python.
#python #pandas #sql #dataanalysisus #techjobsus #BusinessIntelligence #BI #BusinessAnalytics #USJobs #USA #USHiring #USCompanies #AmericanBusiness #Tech #FinTech #HealthcareAnalytics #RetailAnalytics #MarketingAnalytics #Networking #ProfessionalDevelopment #CareerGrowth #IndustryInsights #DataAnalysis #DataScience #BigData #DataAnalytics #DataDriven #RemoteWork #RemoteJob #WorkFromHome #WFH #RemoteCareer #RemoteOpportunity #DigitalNomad #GlobalTalent