<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Karthik on Medium]]></title>
        <description><![CDATA[Stories by Karthik on Medium]]></description>
        <link>https://medium.com/@karthik0205?source=rss-a639191eb7d1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*HEKjohjeBwRoktej</url>
            <title>Stories by Karthik on Medium</title>
            <link>https://medium.com/@karthik0205?source=rss-a639191eb7d1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 11:06:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@karthik0205/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Mastering Descriptive Statistics with SQL: A Beginner’s Guide to Group By and Aggregation Functions]]></title>
            <link>https://medium.com/aatomz-research/mastering-descriptive-statistics-with-sql-a-beginners-guide-to-group-by-and-aggregation-functions-067a777afae7?source=rss-a639191eb7d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/067a777afae7</guid>
            <category><![CDATA[descriptive-statistics]]></category>
            <category><![CDATA[variablz]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Karthik]]></dc:creator>
            <pubDate>Tue, 14 Nov 2023 08:57:12 GMT</pubDate>
            <atom:updated>2023-11-14T08:57:12.037Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y_4sV1wjwZkryV2KD35P2w.jpeg" /></figure><p>SQL (Structured Query Language) is a powerful tool to manage and querying a relational database. Groupby and aggregate functions play a crucial part in extracting meaningful insights from large datasets for descriptive statistical analysis.</p><p>Groupby and aggregate functions enable you to retrieve, analyze, and summarize data from your database table.</p><p>Let’s delve into a real-world example to illustrate how these concepts can be applied.</p><p>The dataset can be downloaded from:</p><p><a href="https://www.kaggle.com/datasets/sankha1998/ipl2023?select=each_match_records.csv">Indian Premier League (IPL) 2023 Dataset</a></p><h3>Groupby:</h3><p>Groupby is frequently used and is one of the essential clauses in SQL. It segments the data into distinct groups based on a specified column/columns.</p><p>To illustrate, consider a scenario where we examine how many times the Chennai Super Kings won the toss.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EyCWtBaWmPXkkpPbiIAvUQ.png" /></figure><p>The code groups all team names in each row, and the output reveals the frequency of Chennai Super Kings’ mentions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*x3VcS1WvG6H3C9KpSYZ0TQ.png" /></figure><p>It is most efficient when you want to perform operations on each group such as counting, summing, or finding the average values within each group.</p><h3>Aggregate Functions:</h3><p>Aggregate functions are part of the <strong>SELECT </strong>statement and this allows us to filter rows or columns and filter only rows. It is combined with the <strong>GROUP BY </strong>clause to perform calculations on the grouped data.</p><p>They allow you to summarize and obtain statistical information from your data. Common aggregate functions include:</p><p>a. COUNT: Calculates the number of rows in each group.</p><p>For instance, we use the COUNT function to determine the number of matches played at the MA Chidambaram Stadium.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YfEs3ypFZcZ_-z2cFQAhhA.png" /></figure><p>The code groups venues separately and counts the occurrences of MA Chidambaram Stadium, presenting a clear picture of its prominence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/426/1*qnJ2XK0zpw8H-HMG05b6tQ.png" /></figure><p>b. SUM: Adds up the values within each group.</p><p>As name suggest it will sum up the values of the given data.</p><p>The SUM function steps in to add up the winners’ run differences scored by each team in all matches. This simple yet powerful calculation offers a consolidated view of team performances.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HzHQ3b6G9mpyddMn51ohDw.png" /></figure><p>This simple yet powerful calculation offers a consolidated view of team performances.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*4MgChGcYFNcRxAG58vSL0A.png" /></figure><p>c. AVG: Computes the average of values in each group.</p><p>We calculate the average wickets taken by each team to secure victory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_f5rVY4xUuQWr5XXeyX6lw.png" /></figure><p>This statistical insight provides a nuanced understanding of teams’ bowling prowess.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/906/1*GYuBES6G8LnJ5CKkN9cYMQ.png" /></figure><p>d. MAX: Finds the maximum value in each group.</p><p>MAX and MIN functions take center stage to identify the maximum and minimum values within each group. By utilizing these functions, we unravel the extremes in our dataset, showcasing the peaks and valleys of performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nSzu0ZsZwvY59EquuYRlKA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/323/1*CKYwlbHx_HKeGIInKMDwzg.png" /></figure><p>e. MIN: Identifies the minimum value in each group.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wUTkvdSEQJqyGfLsk1np5A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*uEZuq6M1NOHqmeJHc2ICbA.png" /></figure><h3>Conclusion:</h3><p>In summary, Group By and Aggregate Functions are fundamental tools in SQL for organizing and summarizing data. They help you gain insights, perform calculations, and make data-driven decisions by breaking down and analyzing large datasets into meaningful subsets. These capabilities are crucial in various applications, from business analytics to reporting and data management.</p><p>I will come up with another article until then adios.</p><p>Karthik Saravanan</p><p><a href="https://www.linkedin.com/in/karthik-sa/">https://www.linkedin.com/in/karthik-sa/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=067a777afae7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aatomz-research/mastering-descriptive-statistics-with-sql-a-beginners-guide-to-group-by-and-aggregation-functions-067a777afae7">Mastering Descriptive Statistics with SQL: A Beginner’s Guide to Group By and Aggregation Functions</a> was originally published in <a href="https://medium.com/aatomz-research">Aatomz Research</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[NumPy : Mastering Descriptive Statistics for Data Insights]]></title>
            <link>https://medium.com/aatomz-research/numpy-mastering-descriptive-statistics-for-data-insights-b1cca36b1ee1?source=rss-a639191eb7d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/b1cca36b1ee1</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[numpy]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[variablz]]></category>
            <dc:creator><![CDATA[Karthik]]></dc:creator>
            <pubDate>Tue, 24 Oct 2023 18:38:01 GMT</pubDate>
            <atom:updated>2023-10-24T18:38:01.627Z</atom:updated>
            <content:encoded><![CDATA[<p>In the world of data analysis, the need to efficiently process and analyze vast datasets is a common challenge. You might find yourself faced with slow processing speeds, limited capabilities, or incompatible libraries when working with data in Python.</p><p>This is where NumPy, the Numerical Python library, steps in to offer a compelling solution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*vLmCE-IMC2Pq-K26MctH6g.png" /></figure><p>You may ask (if you are a beginner) what is NumPy and why we are using it,</p><p>NumPy (Numerical Python) is a fundamental and widely used library in Python for data analysis. NumPy will make it easy to process vast amounts of data in a matrix format.</p><p>Many consider NumPy to be the most powerful package in Python.</p><p>And to answer why NumPy — Processing speed of NumPy.</p><p>It is always a good idea to move the data processing into NumPy rather than using multiple programming conditional and looping statements. They tend to slow down the processing speed significantly.</p><ol><li><strong>Multidimensional Arrays</strong>: Provides ‘ndarray’ data structure, which allows to create and manipulate arrays with any number of dimensions.</li><li><strong>Mathematical operations:</strong> Includes a wide range of mathematical functions, this consists of element-wise operations, linear algebra, statistical functions, and more.</li><li><strong>Random number generation</strong>: Provides a tool for generating random numbers and arrays.</li><li><strong>Broadcasting</strong>: NumPy allows you to perform operations on arrays of different shapes.</li><li><strong>Integration with Other Libraries</strong>: NumPy integrates well with other scientific and data analysis libraries like SciPy (for scientific computing), Matplotlib (for data visualization), and Pandas (for data manipulation).</li></ol><p>Now let’s see about <strong><em>Descriptive statistics,</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*Rcvq8-SSLELBfaZnJmFkFQ.jpeg" /></figure><p>It is used to summarize and describe the main features of a dataset.</p><p>The most important part of the data field is Analysing it, which can be done using both descriptive and inferential statistics. Both are used to analyze the data and draw conclusions from it.</p><p>Data is everything in statistics. Calculating the range, median, and mode of the data set is all a part of descriptive statistics.</p><p>Say, for instance, “Is it going to rain today? Should I bring my umbrella to work or not? We will pull out our phones and check the weather forecast to find the answers to these queries. How is this accomplished? There are computer programs that use statistics to compare previous and present weather conditions to forecast the weather in the future.</p><p>Descriptive Statistics in NumPy can be differentiated into two sectors, they are <strong>Measures of Central Tendency</strong> and <strong>Measures of Variability (or Dispersion)</strong></p><p>We will see one by one:</p><h3><strong>Measures of Central Tendency:</strong></h3><h4>Section 1: Mean</h4><p>As the image depicts, the Mean is to find the average value of a date set. To compute the mean, sum all the values and divide the sum by the number of values.</p><pre>import numpy as np <br>temperatures = np.array([72, 75, 68, 70, 74, 73, 71])<br>mean_temperature = np.mean(temperatures) <br>print(f”The mean temperature is {mean_temperature} degrees.”)<br><br>The mean temperature is 71.85714285714286 degrees.</pre><h4>Section 2: Median</h4><p>As the picture implies, the Median is the middle value of a data set. It is obtained by ordering all data points and picking out the one in the middle.</p><pre>import numpy as np <br>prices = np.array([250000, 275000, 310000, 425000, 725000, 290000]) <br>median_price = np.median(prices) <br>print(f”The median house price is ${median_price}.”)<br><br>The median house price is $300000.0.</pre><h4><strong>Section 3: Mode</strong></h4><p>Mode is nothing but a value occurring frequently in a data set.</p><pre>import numpy as np<br>from scipy import stats # Import the stats module for mode calculation<br><br># Sample dataset<br>data = np.array([2, 3, 4, 5, 3, 4, 6, 5, 5, 2, 7, 7, 2]) <br># Calculate the mode using the stats module from SciPy<br>mode_result = stats.mode(data) <br><br>print(f”The mode of the dataset is: {mode_result.mode[0]}”)<br>print(f”It occurs {mode_result.count[0]} times.”)<br><br>import numpy as np <br>returns = np.array([0.02, 0.03, -0.01, -0.02, 0.01])<br>variance = np.var(returns)<br>std_deviation = np.std(returns)<br>print(f”Variance: {variance}, Standard Deviation: {std_deviation}”)<br><br>The mode of the dataset is: 2<br>It occurs 3 times.</pre><h3>Now comes the <strong>Measures of Variability / Dispersion</strong></h3><h4>Section 1: Minimum and Maximum — Identifying Extremes</h4><p>The minimum and maximum values in a dataset provide insights into the data’s range. They are crucial when dealing with constraints or identifying outliers.</p><p>There are other functions to calculate minimum and maximum such as numpy.amin() and numpy.amax(), numpy.ptp() function to calculate range in Python.</p><pre>import numpy as np <br>scores = np.array([85, 92, 77, 98, 63, 100])<br>min_score = np.min(scores)<br>max_score = np.max(scores) <br>print(f”Minimum score: {min_score}, Maximum score: {max_score}”)<br><br>Minimum score: 63, Maximum score: 100</pre><h4>Section 2: Variance and Standard Deviation — Measuring Data Spread</h4><p>Variance and standard deviation quantify how spread out the data is. Variance measures the average of the squared differences from the mean, while standard deviation is the square root of the variance.</p><pre>import numpy as np <br>returns = np.array([0.02, 0.03, -0.01, -0.02, 0.01])<br>variance = np.var(returns)<br>std_deviation = np.std(returns) <br>print(f”Variance: {variance}, Standard Deviation: {std_deviation}”)<br><br>Variance: 0.000344, Standard Deviation: 0.01854723699099141</pre><h4>Section 3: Percentiles and Interquartile Range — Dividing Data into Quarters</h4><p>Percentiles divide data into hundredths, while quartiles (Q1 and Q3) divide data into four quarters. The interquartile range (IQR) represents the range between Q1 and Q3.</p><pre>import numpy as np <br>income = np.array([40000, 55000, 60000, 75000, 85000, 95000, 120000])<br>q1 = np.percentile(income, 25)<br>q3 = np.percentile(income, 75)<br>iqr = q3 — q1 <br>print(f”Q1: {q1}, Q3: {q3}, IQR: {iqr}”)<br><br>Q1: 57500.0, Q3: 90000.0, IQR: 32500.0</pre><h3>Conclusion:</h3><p>In essence, descriptive statistics, combined with the capabilities of NumPy, equips us with the tools to dig into datasets, understand their characteristics, and draw meaningful conclusions.</p><pre>import numpy as np<br>import matplotlib.pyplot as plt<br>from scipy import stats<br><br># Sample dataset<br>data = np.array([2, 3, 4, 5, 3, 4, 6, 5, 5, 2, 7, 7, 2])<br><br># Calculate mean, median, and mode<br>mean_value = np.mean(data)<br>median_value = np.median(data)<br>mode_result = stats.mode(data)<br>mode_value = mode_result.mode[0]<br><br># Create a list of labels<br>labels = [‘Mean’, ‘Median’, ‘Mode’]<br><br># Create a list of values<br>values = [mean_value, median_value, mode_value]<br><br># Create a line plot<br>plt.plot(labels, values, marker=’o’, linestyle=’-’, color=’b’)<br><br># Add labels and a title<br>plt.xlabel(‘Statistics’)<br>plt.ylabel(‘Values’)<br>plt.title(‘Mean, Median, and Mode Line Plot’)<br><br># Display the plot<br>plt.grid(True)<br>plt.show()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*Jy37R9C3g_blQ4pdClstYg.png" /></figure><p>In conclusion, you’ve not only explored the fundamental principles of descriptive statistics but also harnessed the remarkable capabilities of NumPy, equipping yourself with the tools to uncover valuable insights and make informed decisions. Whether you’re a novice data enthusiast or an experienced statistician, you’ve learned to find the mean, median, mode, and measures of variability, paving the way for data analysis excellence.</p><p>With curiosity as your guide and perseverance as your companion, you’re well-prepared to embrace a data-driven future, where your newfound skills will undoubtedly lead to positive and impactful outcomes.</p><p>I will come up with another article until then adios.</p><p>Karthik Saravanan</p><p><a href="https://www.linkedin.com/in/karthik-sa/">https://www.linkedin.com/in/karthik-sa/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b1cca36b1ee1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aatomz-research/numpy-mastering-descriptive-statistics-for-data-insights-b1cca36b1ee1">NumPy : Mastering Descriptive Statistics for Data Insights</a> was originally published in <a href="https://medium.com/aatomz-research">Aatomz Research</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Essential Pandas Functions for Efficient Data Analysis]]></title>
            <link>https://medium.com/aatomz-research/the-essential-pandas-functions-for-efficient-data-analysis-26612dea4484?source=rss-a639191eb7d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/26612dea4484</guid>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[aatomz]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Karthik]]></dc:creator>
            <pubDate>Wed, 13 Sep 2023 18:36:28 GMT</pubDate>
            <atom:updated>2023-09-13T18:36:28.566Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*7S8xLWkb1FLOexQ6vUWcRQ.png" /></figure><h3>1. pd.read_csv, pd.read_excel:</h3><p>The first function to mention and one of the most crucial methods of Pandas is reading csv (comma-separated value), excel files. The functions are self-explanatory. They are used to read CSV and excel files to a pandas DataFrame format.</p><p><strong>pd.read_csv </strong>has many parameters that allow users to customize the behavior of the function.</p><ul><li>filepath_or_buffer: The path or buffer to the CSV file to read.</li><li>sep: The delimiter used in the CSV file.</li><li>header: The row number(s) to use as the column names for the DataFrame.</li><li>index_col: The column(s) to use as the index of the DataFrame.</li><li>usecols: The column(s) to select from the CSV file.</li><li>dtype: The data type(s) for the columns in the DataFrame.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*Dk0CBg_V2hP_iDQW2y9d_w.gif" /></figure><p><strong>pd.read_excel </strong>also has many parameters that allow users to customize the behavior of the function, including:</p><ul><li>io: The path or buffer to the Excel file to read.</li><li>sheet_name: The name or index of the sheet(s) to read from the Excel file.</li><li>header: The row number(s) to use as the column names for the DataFrame.</li><li>index_col: The column(s) to use as the index of the DataFrame.</li><li>usecols: The column(s) to select from the Excel file.</li><li>dtype: The data type(s) for the columns in the DataFrame.</li></ul><p>Both are powerful functions used to load data from an external source into DataFrame easily. Then the DataFrame can be manipulated and analyzed using other functions in Pandas. These functions are essential tools for data analysts and data scientists who work with tabular data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BdxLUUK9NZAELugJGXdY5w.jpeg" /></figure><p>It is also common to use <strong>.head()</strong> or <strong>.tail()</strong> function after read_csv or read_excel to see the data frame. By default, it shows the first or last 5 rows of the DataFrame.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*o_7lgcWkHOEh-gdnm1Ky6A.jpeg" /></figure><h3>2. df.columns:</h3><p>While having a big data set it will be hard to keep track of the columns. Using the <strong>df.columns</strong> attribute returns the column name/label.</p><ol><li>Data Type: The df.columns function returns an index object, which is a pandas data structure that is similar to a list or a dictionary.</li><li>Usage: This function can be called on a pandas DataFrame object to get a list of all the column labels. For example, if you have a DataFrame called df, you can call df.columns to get a list of all the column labels in df.</li><li>Name: The index object returned by df.columns does not have a name. However, you can assign a name to the index object by setting the name attribute of the index object. For example, you can set df.columns.name = &quot;Column Labels&quot; to assign the name &quot;Column Labels&quot; to the index object.</li><li>Mutable: The df.columns index object is mutable, which means you can change the column labels of a DataFrame by assigning a new list of labels to the df.columns index object. For example, you can set df.columns = [&quot;new_label_1&quot;, &quot;new_label_2&quot;, &quot;new_label_3&quot;] to change the column labels of the DataFrame to the new labels provided in the list.</li><li>Indexing: The df.columns index object supports indexing and slicing. For example, you can get the first column label in the DataFrame by calling df.columns[0].</li><li>Length: The df.columns index object has a length that corresponds to the number of columns in the DataFrame. You can get the length of the index object by calling len(df.columns).</li><li>Properties: The df.columns index object has several properties that provide information about the index, such as df.columns.dtype to get the data type of the index labels, df.columns.is_unique to check if all the index labels are unique, and df.columns.nlevels to get the number of levels in a multi-level index.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*v4f7-oHsyIvKtYEKLDbApg.jpeg" /></figure><p>Overall, the df.columns function is a useful tool for getting information about the column labels of a pandas DataFrame and for modifying the column labels if necessary.</p><p>The df.columns attribute can be used to do many tasks, such as:</p><ul><li>Renaming columns: Users can assign a new list of column labels to df.columns and rename the columns in a DataFrame.</li><li>Filtering columns: Users can select a subset of columns from a DataFrame by indexing df.zecolumns.</li><li>Accessing column names: Users can retrieve the column labels as a list by calling the tolist() method on the Pandas Index object returned by df. columns.</li><li>Checking for column names: Users can check if a particular column name is present in a DataFrame by using the in operator on df.columns.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s0s0T-Ek9_NJyFAr5gYkWw.jpeg" /></figure><h3>3. Shape, Size, and Info:</h3><p>The most important part after reading the data is to know the number of rows and columns and to know the datatype of variables.</p><p><strong>df.shape</strong>, it gives the total number of rows and then columns in a tuple format. It is mainly used to understand the size of the DataFrame and to perform operations that depend on the size of the DataFrame, such as reshaping, merging, or concatenating multiple DataFrames.</p><ol><li>The shape function is a read-only property, which means that you cannot modify the shape of a DataFrame or Series directly using this method.</li><li>The shape function is useful for determining the size of a DataFrame or Series, which can be helpful when working with large datasets.</li><li>The shape function can be used to select a subset of rows or columns from a DataFrame based on their position.</li><li>The shape function can be used to reshape a DataFrame or Series by changing the number of rows or columns.</li><li>The shape function can be used to compare the dimensions of two or more DataFrames or Series to check if they are compatible with certain operations.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/998/1*OwmTG2b_z9ln1WrjAQ8u0Q.png" /></figure><p>In conclusion, the shape function in Pandas is a useful tool for getting the dimensions of a DataFrame or Series and for working with large datasets.</p><p><strong>df.size()</strong> returns the total number of elements in the DataFrame, which is equal to the product of the number of rows and the number of columns. It is used to understand memory usage and perform operations like computing summary statistics.</p><ol><li>It returns a single integer value representing the total number of elements in a DataFrame or Series.</li><li>The size function is a read-only property, which means that you cannot modify the size of a DataFrame or Series directly using this method.</li><li>The size function is useful for determining the total number of elements in a DataFrame or Series, which can be helpful when working with large datasets.</li><li>The size function is different from the shape function, as it returns the total number of elements in a DataFrame or Series, while the shape function returns a tuple of the number of rows and columns.</li><li>The size function can be used to select a subset of elements from a DataFrame or Series based on their position.</li><li>The size function can be used to reshape a DataFrame or Series by changing the total number of elements.</li><li>The size function can be used to compare the total number of elements in two or more DataFrames or Series to check if they are compatible with certain operations.</li></ol><p>In conclusion, the size function in Pandas is a useful tool for getting the total number of elements in a DataFrame or Series and for working with large datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*Bs4B8KQmSESnhvZmA24Vjg.png" /></figure><p><strong>df.info()</strong>, returns information such as rows from RangeIndex, Data columns, and then the data type of each column. It also includes information on non-null counts. is useful for understanding the data types and missing values in a DataFrame, as well as for identifying potential memory issues.</p><ol><li>The info function is useful for quickly inspecting the data contained in a DataFrame or Series, and for identifying potential data quality issues, such as missing values or incorrect data types.</li><li>The info function is a read-only method, which means that you cannot modify the data contained in a DataFrame or Series directly using this method.</li><li>The info function can be used to select a subset of columns from a DataFrame based on their data type.</li><li>The info function can be used to convert the data type of a column in a DataFrame.</li><li>The info function can be used to identify potential memory usage issues in a DataFrame, and to optimize memory usage by converting data types or dropping unnecessary columns.</li><li>The info function can be used to compare the data types and memory usage of two or more DataFrames to check if they are compatible with certain operations.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*iCsZhQW18JwoyTXJHyfLbg.png" /></figure><p>In conclusion, the info function in Pandas is a useful tool for quickly summarizing the data contained in a DataFrame or Series and for identifying potential data quality and memory usage issues.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TRB5gE_6wiwcDEBUd_8J_Q.jpeg" /></figure><h3>4. df.loc() and df.iloc():</h3><p><strong>df.iloc()</strong>, is used to select rows and columns by integer position. It takes as a parameter the rows and column indices and gives you the subset of the DataFrame accordingly</p><ol><li>The syntax for using the iloc function is df.iloc[row_indexer, column_indexer].</li><li>The row_indexer and column_indexer can be an integer, a list of integers, or a slice object. The : operator is used to select a range of rows or columns.</li><li>The iloc function is used when you want to select data based on its position rather than its label.</li><li>The iloc function is zero-based, which means that the first row or column is indexed at 0.</li><li>The iloc function can be used to modify a subset of rows or columns in a DataFrame.</li><li>The iloc function returns a DataFrame or Series, depending on the number of rows and columns selected.</li><li>The iloc function can be used in combination with other Pandas functions such as loc, ix, at, and iat for more advanced indexing.</li><li>The iloc function is a very powerful tool for selecting, slicing, and modifying data in a DataFrame.</li></ol><p>In conclusion, the iloc function in Pandas is a powerful method for selecting, slicing, and modifying data in a DataFrame based on its integer position. It is an essential tool for working with large datasets in Pandas.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/1*ZH2hKEXW4liJP5pGPaDPjg.jpeg" /></figure><p><strong>df.loc(), </strong>which<strong> </strong>is used to select rows and columns by the label. Almost a similar operation as .iloc() function. But here we can specify exactly which row index we want and also the name of the columns we want in our subset.</p><ol><li>The loc function allows for the selection of rows and columns by label or boolean indexing.</li><li>Syntax — df.loc[row_labels, column_labels], where row_labels and column_labels are the labels of the rows and columns that you want to select.</li><li>The loc function can be used with a single label, a list of labels, or a slice of labels.</li><li>The loc function is inclusive of both the start and end points when using a slice.</li><li>The loc function can also accept boolean arrays that are used to filter rows or columns.</li><li>The loc function returns a new DataFrame or Series that contains the selected rows and columns.</li><li>The loc function is commonly used for label-based indexing in Pandas.</li><li>The loc function is also used for assigning values to specific rows and columns in a DataFrame.</li></ol><p>In conclusion, the loc function in Pandas is a useful tool for selecting and accessing data from a DataFrame based on its labels. It can be used with a variety of labels and boolean indexing to filter and manipulate data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*rcVTdvtmkU0oGGkEMPIugQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0lhCq8214gDUubvGjuHrBQ.jpeg" /></figure><h3>4. groupby():</h3><p><strong>groupby()</strong> is used to group a Pandas DataFrame by 1 or more columns and perform some mathematical operation on it. This method is particularly useful for data analysis and data science tasks, where we often need to summarize or aggregate data based on certain criteria.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T0l_Az8QmCashrGXlEfgGQ.jpeg" /></figure><ol><li>Group the DataFrame by one or more columns using the groupby method. This creates a DataFrameGroupBy object.</li><li>Apply a summary function (such as mean, sum, count, max, or min) to the grouped data using the agg method of the DataFrameGroupBy object.</li><li>Optionally, apply additional transformations or filters to the grouped data.</li><li>The groupby function is also very flexible, and allows you to perform more complex operations such as:</li></ol><ul><li>Grouping by a function or lambda expression</li><li>Applying multiple summary functions at once</li><li>Specifying different summary functions for different columns</li><li>Filtering groups based on a condition</li><li>Iterating over the groups and performing custom operations</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lNomBxVQGw1jjvEnmrt1PQ.jpeg" /></figure><p>The Pandas library is vast, containing numerous functions. However, knowing certain important functions is essential for performing most data analysis tasks successfully.</p><p>These functions are typically used in the initial stages of data preprocessing, and memorizing them is recommended.</p><p>While there are many other useful functions in Pandas, they can be explored based on specific conditions and requirements.</p><p>For further exploration, one can refer to the Pandas documentation available at <a href="https://pandas.pydata.org/pandas-docs/stable/reference/frame.html">https://pandas.pydata.org/pandas-docs/stable/reference/frame.html</a>.</p><p>Hope the article was helpful.</p><p>Karthik Saravanan</p><p><a href="http://www.linkedin.com/in/karthik-sa">www.linkedin.com/in/karthik-sa</a></p><p>Adios!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=26612dea4484" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aatomz-research/the-essential-pandas-functions-for-efficient-data-analysis-26612dea4484">The Essential Pandas Functions for Efficient Data Analysis</a> was originally published in <a href="https://medium.com/aatomz-research">Aatomz Research</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Art of Aligning Data Frames in Pandas and SQL]]></title>
            <link>https://medium.com/aatomz-research/the-art-of-aligning-data-frames-in-pandas-and-sql-50ed271753e1?source=rss-a639191eb7d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/50ed271753e1</guid>
            <category><![CDATA[aatomz]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Karthik]]></dc:creator>
            <pubDate>Mon, 27 Mar 2023 23:11:36 GMT</pubDate>
            <atom:updated>2023-03-27T23:11:36.471Z</atom:updated>
            <content:encoded><![CDATA[<h4>Mastering Data Integration — Part 01</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C5cIeEvH-f0b8Zpui30Izw.png" /><figcaption>The Art of Aligning Data — Credits: Aatomz</figcaption></figure><p>In this article, we will discuss the similarities and differences between aligning data in Pandas and SQL. We will start by explaining what data alignment is and why it is important. Then, we will explore how data alignment is done in both Pandas and SQL. Finally, we will compare the two methods and provide some examples.</p><h3><strong>What is data alignment?</strong></h3><p>Data alignment is the process of combining two or more datasets so that their rows or columns match up correctly. This is important because it allows us to compare, analyze, and manipulate data that comes from different sources. In other words, data alignment helps us make sense of large and complex datasets.</p><h3><strong>Pandas:</strong></h3><p>Pandas is a popular data manipulation tool that is used for data analysis in Python. It offers a wide range of functions and tools for data analysis, including data alignment. One of the key advantages of Pandas is that it can handle missing data and NaN values, making it an excellent tool for cleaning and transforming data.</p><p>One of the primary ways to align data frames in Pandas is by using the merge() function. The <strong>merge()</strong> function combines two or more data frames based on a common column or index.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/1*0gcVXpseXy1Y3grwKKWjSQ.jpeg" /></figure><h3><strong>SQL</strong></h3><p>SQL, on the other hand, is a query language that is widely used for managing and querying relational databases. It is an excellent tool for aligning data from different sources, and it offers powerful tools for data manipulation and analysis. However, it is less flexible than Pandas when it comes to handling missing data.</p><p>SQL has a specific command called <strong>“JOIN”</strong> that is used to merge tables based on a common column. For example, let’s say we have two tables called “table1” and “table2”. Both tables have a common column called “ID”, and we want to merge them based on this column. We can use the following SQL query to achieve this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/969/1*ozRnkoWJTtz3biST9xCObQ.jpeg" /></figure><h3><strong>Data alignment in Pandas:</strong></h3><p>Pandas data frames are essentially two-dimensional arrays with rows and columns, similar to tables in SQL. One of the primary benefits of Pandas is that it provides a wide range of tools for data alignment, including:</p><p><strong>Concatenation:</strong> Concatenation is the process of combining two or more data frames along a particular axis. For instance, you can concatenate two data frames horizontally or vertically using the pd.concat() function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wi9EJsJl8bUH7ewd4NCjxQ.jpeg" /></figure><p><strong>Merging:</strong> Merging involves combining data from two or more data frames into a single dataframe based on common columns. You can use the pd.merge() function in Pandas to merge data frames.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1wkHhGdCoX1OP3a0-RuVmg.jpeg" /></figure><p><strong>Joining:</strong> Joining is similar to merging, but it’s a specific type of merge that combines data frames based on their index rather than their columns. You can use the .join() method in Pandas to join data frames.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XCGrliVWWaCpBEvrJ24Ivw.jpeg" /></figure><p><strong>Reshaping:</strong> Reshaping involves transforming data from a long to a wide format or vice versa. You can use the pd.pivot() function in Pandas to reshape data frames.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GN63lvlEpL3TMJfGOv9yRw.jpeg" /></figure><p>Some of the other Data alignments in Pandas,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O0sp3bbcEhswe4oy-mpMIw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PgQxxcS1D16AEcu4Y8l0Ew.jpeg" /></figure><h3>Data alignment in SQL:</h3><p>In SQL, data alignment is done using the JOIN keyword. The JOIN keyword combines two or more tables based on a common column or key.</p><p>Let’s say we have two tables: employees and departments. Both contain information about employees but employees have additional columns that departments do not. We can align the two tables using the JOIN keyword as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qv1xHzl8puoP8Ps4TDh14Q.jpeg" /></figure><p>The primary types of JOINs in SQL include:</p><p>Consider two different tables,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/444/1*wtSWsXA7Vdz4DJNuao3EJw.jpeg" /></figure><p><strong>Inner Join:</strong> It returns only the rows that have matching values in both tables. It compares the values of a specified column in both tables and includes only the rows where the values match.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*YRqoEXqVyoYYHLM5qhE51A.jpeg" /></figure><p><strong>Left Join:</strong> It returns all the rows from the left table and the matching rows from the right table. If there is no match in the right table, NULL values are returned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*lVlcwUaliJB-jwqXTVFnZg.jpeg" /></figure><p><strong>Right Join:</strong> It returns all the rows from the right table and the matching rows from the left table. If there is no match in the left table, NULL values are returned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*KDrQwia4N7kynRSH7HiAUw.jpeg" /></figure><p><strong>Full Join:</strong> It returns all the rows from both tables. If there is no match in one of the tables, NULL values are returned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*oUuoGeprxgDjSD-P2maujg.jpeg" /></figure><p><strong>Cross Join:</strong> It returns the Cartesian product of the two tables. It combines each row from the first table with every row from the second table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*htbbpn1jEf_6ZSkF1aaNTA.jpeg" /></figure><p><strong>Self-join:</strong> It is a regular join, but the table is joined with itself. It is useful when we need to compare the rows within a table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*GKUZBN03UUF0-_DSPjNkDA.jpeg" /></figure><h3><strong>Comparing Pandas and SQL Data Alignment:</strong></h3><p>Both Pandas and SQL provide different ways of aligning data based on their labels and values. While Pandas aligns data based on the labels of its columns and rows, SQL aligns data based on the values of a common column. Pandas provides a more flexible and intuitive way of aligning data, while SQL provides a more structured and efficient way of joining data from different tables.</p><p>Pandas are more suitable for data analysis and manipulation tasks that involve working with smaller datasets, while SQL is more suitable for managing large and complex datasets stored in a relational database.</p><p>In conclusion, both Pandas and SQL offer powerful tools for aligning and combining data. Pandas offers a more Pythonic approach with more flexible options, while SQL offers a more traditional database-centric approach with optimized performance for large datasets. The choice between these tools depends on the specific needs and requirements of the project.</p><p>Hope the article was helpful.</p><p>Karthik Saravanan</p><p><a href="http://www.linkedin.com/in/karthik-sa">www.linkedin.com/in/karthik-sa</a></p><p>Adios!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=50ed271753e1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aatomz-research/the-art-of-aligning-data-frames-in-pandas-and-sql-50ed271753e1">The Art of Aligning Data Frames in Pandas and SQL</a> was originally published in <a href="https://medium.com/aatomz-research">Aatomz Research</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Evolution of Pandas Library!]]></title>
            <link>https://medium.com/aatomz-research/evolution-of-pandas-library-258066ccd080?source=rss-a639191eb7d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/258066ccd080</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[aatomz]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[pandas]]></category>
            <dc:creator><![CDATA[Karthik]]></dc:creator>
            <pubDate>Tue, 14 Feb 2023 18:37:02 GMT</pubDate>
            <atom:updated>2023-02-14T18:37:02.440Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*134MKqZD8HdXQARLeIip3w.png" /></figure><p>Pandas is an open-source library for data analysis in Python, which has been around for over a decade. It provides a data structure for efficiently storing large datasets and tools for working with them, which makes it an indispensable tool for Data Scientists/Data Analyst etc.,</p><p>In this article, we will take a brief look at the timeline of Pandas library and its evolution over the years.</p><p>2008: Pandas Birth</p><p>In 2008, Wes McKinney, a software engineer at AQR Capital Management, released the first version of Pandas. It was created to help him to manipulate and analyze financial data, but the library&#39;s popularity suddenly increased among data analysts and data scientists in other fields.</p><p>2010–2014: Growth in Popularity</p><p>During this period, Pandas acquired popularity in the data analysis community and found widespread use in a number of disciplines, including statistics, economics, and finance. It quickly got established as a staple tool in the data science toolkit.</p><p>2015: Increased Accessibility</p><p>Pandas 0.17, which was released in 2015, made the library more versatile and powerful. New capabilities like the ability to perform time-series analysis, simpler handling of missing data, and enhanced speed, were added. These features helped Pandas improve and increase its popularity even more.</p><p>2017–2019: Major Upgrade</p><p>Pandas 0.20, which was released in 2017, marked a significant improvement. Numerous new features were included, including enhanced datetime processing, support for multi-level indexing, and enhanced huge dataset management. It increased the adaptability and capability of Pandas, making data scientists and analysts increasingly drawn to them.</p><p>Then updates ranging from version 0.21 to version 0.25 (2017–2019) got released. Starting with the 0.25.x series of releases, pandas only supports Python 3.5.3 and higher. These versions were sole to fix the bugs and few features were included.</p><p>Here are some of the major new features added to the Pandas library between versions 0.20 and 0.25:</p><ul><li>Categorical Data Type: A new data type called “Categorical” was added to better handle categorical variables. This improved memory usage and increased computation speed.</li><li>Nullable Integer Data Type: A new Nullable Integer data type was introduced to store integer values that can contain missing values represented as NaN.</li><li>Pandas.NA: A new constant was introduced that represents missing values in the new nullable data types.</li><li>Merge and Join Enhancements: The merge and join methods received performance enhancements and new capabilities, including faster left and right joins, as well as improved support for multi-level merging.</li><li>Resampling Enhancements: The resampling method received improvements, including the ability to specify custom aggregation functions, and better handling of missing data.</li><li>TimedeltaIndex: The TimedeltaIndex, which represents a set of durations, received new features, including the ability to perform element-wise operations, as well as the addition of new aggregation methods.</li><li>Deprecation of Panel Data Type: The Panel data type was officially deprecated and will be removed in a future version of Pandas.</li></ul><p>Note: This is not an exhaustive list; additional improvements and bug fixes were made in these versions.</p><p>2019 and Beyond:</p><p>Pandas versions ranging from 1.0 — 1.3 got released (2019–2021), which greatly pushed Pandas library popularity and usage.</p><p>Here is a list of some of the features that were added to Pandas library from version 1.0 to version 1.3. Please note that these may not be the latest changes:</p><ol><li>Enhanced IntervalIndex for interval-based time series data.</li><li>New .loc and .iloc accessor property for DataFrames.</li><li>The new .split() method for arrays.</li><li>Improved support for datetime and time delta operations.</li><li>Improved support for handling missing values.</li><li>Enhanced support for categorical data.</li><li>Improved performance for data grouping and aggregation.</li><li>Enhanced support for time-based data operations.</li><li>Improved support for working with arrays and data frames.</li><li>Improved handling of NaN values in data frames.</li></ol><p>Version 1.4 got released in 2022 and version 1.5 got released in 2023.</p><p>Some of the new features added in Pandas from version 1.4 to version 1.5 are:</p><ol><li>New csv compression options — added support for compressing CSV files using bz2, gzip, and lzma compression formats.</li><li>DatetimeIndex improvements — added support for timezone-aware datetime indices and improved performance for time-series operations.</li><li>Improved Interpolation — added new methods for interpolation, such as “nearest” and “zero” interpolation, and improved performance for existing interpolation methods.</li><li>New Merge Function — added a new function “merge_asof” for merging datasets based on the nearest value within a specified tolerance.</li><li>Numeric aggregation — improved performance for aggregation operations on numeric data.</li><li>DateTime slicing — added support for slicing datetime indices by time intervals, such as “3 hours” or “1 day”.</li><li>Improved handling of NaN values — added new options for handling NaN values during operations, such as “propagate_na” or “skipna”.</li><li>Improved categorical handling — improved handling of categorical data, including improved performance for categorical operations.</li><li>Better handling of missing data — added new options for handling missing data, such as “dropna” and “fillna”.</li><li>Improved Indexing — added new options for indexing and selecting data, such as “loc” and “iloc”, and improved performance for existing indexing methods.</li></ol><p>In conclusion, the Pandas library has advanced significantly and become a vital tool for data analysis and manipulation. Pandas is a tool that you simply cannot do without, whether you work in finance, economics, statistics, or any other field that requires data analysis. And it’s always a good idea to check the Pandas library&#39;s official documentation for the latest features, updates, and bug fixes.</p><p>Follow me on LinkedIn for more insightful data science talks and content</p><p><a href="https://www.linkedin.com/in/karthik-sa/">https://www.linkedin.com/in/karthik-sa/</a></p><p>Karthik Saravanan</p><p><em>Adios!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=258066ccd080" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aatomz-research/evolution-of-pandas-library-258066ccd080">Evolution of Pandas Library!</a> was originally published in <a href="https://medium.com/aatomz-research">Aatomz Research</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Take Your 1st Step to Data-Related JOBS with Python]]></title>
            <link>https://medium.com/aatomz-research/take-your-1st-step-to-data-related-jobs-with-python-578e3f01a026?source=rss-a639191eb7d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/578e3f01a026</guid>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[aatomz]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Karthik]]></dc:creator>
            <pubDate>Sat, 28 Jan 2023 00:08:18 GMT</pubDate>
            <atom:updated>2023-01-28T00:08:18.783Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NocXvhtRKR8CBCRvzQmjiw.png" /><figcaption>1st Step to Data JOBS — Credits to Aatomz</figcaption></figure><p>As programmers, we know the importance of sequences such as lists, tuples, etc. But Have you ever handled the data in a table or spreadsheet format in Python?</p><p>If you didn’t, here is your 1st read, and for all the data-related JOBS, you should know how to handle the tabular data in Python, and You’re in the right place to learn it.</p><p>A table or Spreadsheet format is called DataFrame in Python, and it has two-dimensional data structures containing rows and columns of the data. Let’s learn how to create a DataFrame using Pandas — One of the most used Open Source Python libraries for data analysis and manipulation.</p><p>There are various ways to create a DataFrame using Pandas; in this article, I will cover a few methods. Let’s dive…</p><ol><li><strong>DataFrame constructor:</strong></li></ol><p>There are many ways to create a DataFrame using the Pandas DataFrame constructor.</p><p>We can create an empty/blank DataFrame, and then we can add data to it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*YQT8lB4M3q0Oyrqa8dLhjw.jpeg" /></figure><p>We can add rows to the DataFrame using Pandas ‘loc’ property.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*OOjX_FT4RfREPwaa8hJQ4Q.jpeg" /></figure><p>We can also add a column using the empty square brackets ‘[]’ operator and assign values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/597/1*O7tPgiPy8d2rvkH-jMxGug.jpeg" /></figure><p>We will be able to create a DataFrame using the Numpy array method as well. Pass 2D-NumPy array.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*AhDa-HaHwYfgduLkRa_SoA.jpeg" /></figure><p>By using a dictionary and a list of dictionaries in the DataFrame constructor,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/871/1*CJ-kmVXh4TTC3ZuAhyDCnA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/890/1*nEERxRy0AUnFP1swChlZqA.jpeg" /></figure><p>2. <strong>Read function</strong>:</p><p>We can use the ‘<em>read</em>’ function in pandas to create a DataFrame from CSV, Excel, SQL, JSON files, etc.,</p><p>If you are curious about CSV files, let me explain that Comma separated file is a plaintext file containing tabular data. Each line in the file represents a row in a table and is separated by commas.</p><p>Before reading the files, we have to check the below points,</p><ol><li>File path — make sure that the file path is correct and accessible.</li><li>File format — make sure that the file format is supported by the function you use. For example, <em>‘pandas.read_csv()</em>’ is used to read CSV files, <em>‘pandas.read_json()’ </em>is used to read JSON files, and <em>‘pandas.read_html()’ </em>is used to read HTML files.</li></ol><p>Reading a CSV and Excel file, the syntax is slightly different.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1001/1*GTRP4ZbTuQWLUl3d-zM2eA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*o7Xn65P-2aWzAuX3F--7jw.jpeg" /></figure><p>Now let us see how to create a DataFrame from an SQL file,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*iIwAAoluvZAYHzw_0yWiHQ.jpeg" /></figure><p>We use JSON when we don’t want to create a file, but we have the JSON record,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*laHkXeNI6lwBGjsiUdM1gg.jpeg" /></figure><p>Read data from HTML files using the Pandas library. It will generate a data frame; by scraping the HTML page in the backend for any (table) tags and captures the table into a data frame.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*14o89N_pdJnq_PyaE66XBQ.jpeg" /></figure><p>Above are a few methods to create a DataFrame there are other methods as well, like copying from other DataFrame using the <em>‘copy()’</em> function, vertical and horizontal concatenation, etc.,</p><p><strong>Conclusion:</strong></p><p>This article (cheat sheet)helps you to understand how to create a DataFrame and initialize the phase of learning EDA (Exploratory Data Analysis).</p><p>Follow me on LinkedIn for more insightful data science talks and content</p><p><a href="https://www.linkedin.com/in/karthik-sa/">https://www.linkedin.com/in/karthik-sa/</a></p><p>Karthik Saravanan</p><p><em>Adios</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=578e3f01a026" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aatomz-research/take-your-1st-step-to-data-related-jobs-with-python-578e3f01a026">Take Your 1st Step to Data-Related JOBS with Python</a> was originally published in <a href="https://medium.com/aatomz-research">Aatomz Research</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Regular Expression — Leap from Rookie to Expert]]></title>
            <link>https://medium.com/aatomz-research/regular-expression-leap-from-rookie-to-expert-a12a99e3ae1a?source=rss-a639191eb7d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/a12a99e3ae1a</guid>
            <category><![CDATA[pykarthi]]></category>
            <category><![CDATA[regex]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[aatomz]]></category>
            <dc:creator><![CDATA[Karthik]]></dc:creator>
            <pubDate>Wed, 28 Dec 2022 14:09:07 GMT</pubDate>
            <atom:updated>2022-12-28T14:09:07.205Z</atom:updated>
            <content:encoded><![CDATA[<h3>Regular Expression — Leap from Rookie to Expert</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gYZtbBUR8Ey7vDW_POj6QA.jpeg" /></figure><p>The regular expression is commonly known as ‘regex’, ‘re’, or ‘regexp’. It is a powerful tool used to match/find a string pattern and manipulate string.</p><p>The funny thing is that I got introduced to Regular expression in a meme by seeing that my expectation skyrocketed at the same time I thought it might give me a hard time, and yes, it did.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*XIDlFsjtsjQALHhys3MXlg.png" /></figure><p>Jokes apart. Let’s talk about the regular expression in Python, it can be used by importing a module named ‘re’.</p><p>The regular expression is a set of characters with highly specialized syntax. It contains several functions and constants to work with.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*6-z78mtcjb4w3Ch7yz4paQ.png" /></figure><p>In the above example, I have used re.search(), one of the functions in ‘re’, to search for a pattern in the string. As you can see, the result of the program is ‘Match found’ since it found the pattern in the string we requested. We have several functions like search() in the ‘re’ module, which we will discuss later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*URr7NEXasrom2rAJLLVvdw.png" /></figure><p>As you can see in the above example, we have used a set of characters to search for a pattern in the string. The characters which we have used are two of a kind, named literal characters and meta characters.</p><p>Let us discuss them one by one. First, we will see about commonly used regex functions.</p><p><strong>1.</strong> <strong>search() : ­­</strong></p><p>It searches for a specified pattern in a string and returns a match object if the pattern is found we saw in an example in the above-illustrated code.</p><p><strong>2.</strong> <strong>findall():</strong></p><p>This function is used to find all the occurrences of a pattern in a string and returns them as a list of strings.</p><p><strong>3.</strong> <strong>split():</strong></p><p>As the name says, it is used to split a string at each occurrence of a pattern and returns a list of the resulting substrings.</p><p><strong>4.</strong> <strong>sub():</strong></p><p>Substitute it replaces all occurrences of a pattern in a string with a different string.</p><p><strong>5.</strong> <strong>compile():</strong></p><p>Compiles a pattern into an object, which can be used for matching. This is useful if you need to use the same pattern multiple times, as it can save time and resources by compiling the pattern once and reusing the compiled pattern.</p><p><strong>6.</strong> <strong>ignorecase():</strong></p><p>It is used to perform case-insensitive matching. It is passed as the second argument to various regular expression functions such as search(), findall(), and sub().</p><p>To learn more about regex functions, kindly visit — <a href="https://docs.python.org/3/library/re.html">https://docs.python.org/3/library/re.html</a></p><p>Apart from functions, we have Literal characters and Meta characters in the regex module.</p><p><strong>Literal Characters:</strong></p><p>Characters representing themselves are said to be literal characters in the regex module. For example, the letter ‘k’ is a literal character representing itself in the regular expression.</p><p>You can include the character in the match as a literal character in a regular expression. For example, the pattern ‘a’ will match the character ‘a’ in a string.</p><p><strong>Meta Characters:</strong></p><p>Metacharacters are special characters that have a special meaning. They are used to perform more advanced searches and manipulation with regular expressions.</p><p>Here are some common metacharacters and their meanings:</p><p>· ‘.’ (dot) matches any single character (except a newline)</p><p>· ‘*’ matches zero or more occurrences of the preceding character or pattern</p><p>· ‘+’ matches one or more occurrences of the preceding character or pattern</p><p>· ‘?’ matches zero or one occurrence of the preceding character or pattern</p><p>· ‘{n}’ matches exactly n occurrences of the preceding character or pattern</p><p>· ‘{n,}’ matches n or more occurrences of the preceding character or pattern</p><p>· ‘{n,m}’ matches at least n and at most m occurrences of the preceding character or pattern</p><p>· ‘[]’ defines a character class that matches any single character in the class</p><p>· ‘^’ matches the start of a string</p><p>· ‘$’ matches the end of a string</p><p>· ‘\b’ matches a word boundary</p><p>· ‘\d’ matches any digit (equivalent to [0–9])</p><p>· ‘\D’ matches any non-digit (equivalent to [⁰-9])</p><p>· ‘\s’ matches any whitespace character (equivalent to [ \t\n\r\f\v])</p><p>· ‘\S’ matches any non-whitespace character (equivalent to [^ \t\n\r\f\v])</p><p>· ‘\w’ matches any alphanumeric character (equivalent to [a-zA-Z0–9_])</p><p>· ‘\W’ matches any non-alphanumeric character (equivalent to [^a-zA-Z0–9_])</p><p>To know more about Meta Characters, kindly visit -<a href="https://docs.python.org/3/library/re.html#regular-expression-syntax">https://docs.python.org/3/library/re.html#regular-expression-syntax</a></p><p><strong>Practical Examples:</strong></p><ol><li>Validating an email address.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*czCCzbSvNqXHjTS1342GBA.png" /></figure><p>2. Extracting a phone number from a string.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*gisBy3XSdRVHZYM4O8K-tw.png" /></figure><p>3. Extracting URL</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*-Ec3YmGy7wkgeyQKbmAwvQ.png" /></figure><p>The above examples helped in understanding the Regular expression module better.</p><p>Regular expressions can be used in various applications, such as validating input data, extracting information from text files, and parsing structured data. Therefore, understanding how regular expressions work and how to use them effectively is essential to save time and effort when working with strings in Python.</p><p>Karthik Saravanan</p><p><a href="http://www.linkedin.com/in/karthik-sa">www.linkedin.com/in/karthik-sa</a></p><p>Adios!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a12a99e3ae1a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aatomz-research/regular-expression-leap-from-rookie-to-expert-a12a99e3ae1a">Regular Expression — Leap from Rookie to Expert</a> was originally published in <a href="https://medium.com/aatomz-research">Aatomz Research</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[List Vs. Tuple — Essential comparison to avoid Python neophyte’s mistakes.]]></title>
            <link>https://medium.com/aatomz-research/list-vs-tuple-essential-comparison-to-avoid-python-neophytes-mistakes-78d5c6f65919?source=rss-a639191eb7d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/78d5c6f65919</guid>
            <category><![CDATA[karthi]]></category>
            <category><![CDATA[datastrucutre]]></category>
            <category><![CDATA[aatomz]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Karthik]]></dc:creator>
            <pubDate>Tue, 20 Dec 2022 22:54:54 GMT</pubDate>
            <atom:updated>2022-12-21T03:10:24.097Z</atom:updated>
            <content:encoded><![CDATA[<h3>List Vs. Tuple — Essential comparison to avoid Python neophyte’s mistakes.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nktT9WWVImbj3jTEdD648A.png" /></figure><p>List and Tuple are the classes of Python Data structure; they can store one or more objects or values in a specific order. The stored data can be of any data type, including the Nothing type defined by the None keyword.</p><p>To understand the difference between and when to use which, let’s revise the List and Tuples.</p><h4><strong><em>List:</em></strong></h4><p>We don’t have arrays in Python; instead, we have a List data type. The list is dynamic. So that we can modify it (Mutable), it is denoted by square brackets “[]”. It is a container that contains different types of objects and is used to iterate objects.</p><p>We can create a list using square brackets,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*2EXUpnfXWArXTTQwZRZijQ.jpeg" /></figure><p>We can access the items in the list using indices,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/832/1*cTbP-jOx0bymgRL_Q_kUnQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/827/1*FuQxof7QaWcuut1ga6CiEA.jpeg" /></figure><p>We can overwrite/reassign an item in the list,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*Np0XC5frIfl3Q38brFKcYQ.jpeg" /></figure><h4><strong><em>Tuple:</em></strong></h4><p>The tuple is similar to lists, but it is static, which means we cannot modify it (immutable). A set of parentheses denotes the tuple in Python.</p><p>A tuple is created like this,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/1*mOdjbnAs07kD3gvRA7E66Q.jpeg" /></figure><p>Accessing the tuple is the same as in the list; we have to use the indices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*zxzfD52zf8SwQUD6uNVGMg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*W9oQKprVyAWzJO3ygqZzeA.jpeg" /></figure><p>Now we know about the basics of Lists and Tuple nature. Now, let’s look at the similarities between the List and Tuple and then at the differences.</p><h4><strong><em>Similarities between List and Tuple:</em></strong></h4><p>As we discussed above, the list and tuple are similar, and they share the same feature, which we are going to cover below,</p><ul><li>Tuple and list can store empty, single, or multiple variables in a single array.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*5YikJ900VjsaYSliU_o8Mw.jpeg" /></figure><ul><li>We can create a tuple or list with the same data types or a mixture of different data types.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/873/1*CNSW3xgGlkwCNyx5k3kmFQ.jpeg" /></figure><ul><li>A list or tuple can contain repeated values or duplicate items.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*wFi7cGNucP4XOY-RF49BMw.jpeg" /></figure><ul><li>List and Tuple support unpacking.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/968/1*qOfgKEKTlPgpCYIqcc9Ohw.jpeg" /></figure><ul><li>We can access the items using indices in both list and tuple.</li><li>Some functions can be applied on both sides which are len(), max(), min(), sum(), any(), all(), sorted().</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/1*but4FKhbhnofrkMYYgSfcw.jpeg" /></figure><ul><li>We can add a tuple in the list and a list in the tuple.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*189oB4wI9MO50Np7HScCCg.jpeg" /></figure><p>Now let’s talk about the difference between a List and Tuple.</p><h4><strong><em>Difference between List and Tuple:</em></strong></h4><ul><li>We already saw that the syntax of both list and tuple is different, and the list is mutable, whereas the tuple is immutable.</li><li>List iteration time is slower and is time-consuming compared to the tuple.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_T9VlEEfrohwP90RYDMe4A.jpeg" /></figure><ul><li>A list consumes more memory, whereas a tuple consumes less.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*RWvFF_i4jSBIFFO7bF_8sg.jpeg" /></figure><ul><li>The list provides many built-in functions than the tuple.</li><li>Lists are prone to make many errors, unlike tuple operations.</li><li>The list can perform operations like insertion and deletion, but a tuple is appropriate for read-only/accessing elements.</li></ul><h4><strong><em>Use Cases:</em></strong></h4><p>Lists can replace tuples, but a tuple is a handy data structure in some practical cases.</p><p>· Use a tuple when you know what information goes into the container, for example, user credentials, a person detail, etc.,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/893/1*wrkvR0gmmCb8ZnXIICODGA.jpeg" /></figure><p>· Use a list when you want to add similar elements or if you are likely to add/remove an information/item, for example, a shopping list, employee names.,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/928/1*6Ak8vwg3fbfIdSsr3gPXVw.jpeg" /></figure><p>· Using a tuple can make a programmer/interpreter/tester understand that the data should not be changed.</p><p><strong><em>Conclusion:</em></strong></p><p>As we understand the list and tuple, choosing between them will be easy.</p><p>The significant difference is that a list is mutable, and a tuple is immutable.</p><p>Use a list when the lists grow or shrink throughout the program lifecycle, and use a tuple when you are sure that the data will not change in the program’s lifecycle.</p><p>Here I tried to make you comfortable with List and Tuple in Python. Let me know your thoughts in the comment, and I will catch up with another masterpiece soon; until then, adios!</p><p>Karthik Saravanan</p><p><a href="https://www.linkedin.com/in/karthik-sa/">https://www.linkedin.com/in/karthik-sa/</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=78d5c6f65919" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aatomz-research/list-vs-tuple-essential-comparison-to-avoid-python-neophytes-mistakes-78d5c6f65919">List Vs. Tuple — Essential comparison to avoid Python neophyte’s mistakes.</a> was originally published in <a href="https://medium.com/aatomz-research">Aatomz Research</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 Python Math Functions confirm that You’re Not a Rookie…]]></title>
            <link>https://medium.com/aatomz-research/10-python-math-functions-confirm-that-youre-not-a-rookie-2ff758a06805?source=rss-a639191eb7d1------2</link>
            <guid isPermaLink="false">https://medium.com/p/2ff758a06805</guid>
            <category><![CDATA[aatomz]]></category>
            <category><![CDATA[pykarthi]]></category>
            <category><![CDATA[mathematics]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Karthik]]></dc:creator>
            <pubDate>Wed, 14 Dec 2022 12:26:34 GMT</pubDate>
            <atom:updated>2022-12-14T12:26:34.214Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*inJ2wpeneBT33wRXV8CCyQ.png" /></figure><p>Math is a built-in module that can be used for mathematical tasks like calculations, such as numeric, trigonometric, logarithmic, exponential calculations, etc.,</p><p>We can summarize those functions in these categories,</p><p>a. The Constants.</p><p>b. Number functions.</p><p>c. Power and logarithmic functions.</p><p>d. Trigonometric functions.</p><p>e. Angular conversion functions.</p><p>f. Hyperbolic functions and some special functions.</p><p>We are going to discuss a few most valuable functions in this article.</p><p><strong>1. CONSTANTS:</strong></p><p>A constant is a variable that holds values that cannot be changed. These constants are put into our calculations. There are several constants in the built-in modules we will cover some of the most important ones.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*3HgXGGHh50vjSXgXMda4rg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*A41C3ActdNyG09AZlTsf6A.png" /></figure><p>As I mentioned, we can use these values in our calculations/formulae, like,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*xKI2cRLFsoriYQWaspkjsg.png" /></figure><p>Or we can access them, for example, Euler’s number, by using the “math. e” constant.</p><p>math.e = 2.718281…</p><p>math. nan means not a number type; we can use it to initialize those variables that do not include numbers. Its data type is float.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*hQM8axX7KP6uOeuPuoExsw.png" /></figure><p><strong><em>NUMBERS AND NUMERIC REPRESENTATION:</em></strong></p><p><strong>2. ceil and floor:</strong></p><p>The ceil (x) returns an integer greater than or equal to the float value. Likewise, the floor (x) returns an integer value lesser or equal to the given float value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/294/1*UYxW_6PS_5fDRVzPkzCMyA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*xnL2jQ7w8hTGfgGQ7EYcXw.png" /></figure><p><strong>3.</strong> <strong>factorial:</strong></p><p>This method returns the product of all natural numbers for the given value. The factorial of a positive integer n is denoted by n!, which gives all the positive integers less than or equal to n. If n = 0, then it returns 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*CWdhP6tXQbBz5CTWWeU2PA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*PbE6KeIrFHsOZYF6Pl2taA.png" /></figure><p><strong>4.</strong> <strong>gcd:</strong></p><p>The gcd (x,y) returns the greatest common denominator of the two given integer values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*7pZ8oPLIA0LfnGdaV75msg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*O84HuedOx07k61mBQksvwA.png" /></figure><p><strong>5.</strong> <strong>fabs:</strong></p><p>The fabs(x) removes the negative sign of a given number and returns the absolute value of x.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PJRm7R3D85uStucSQK0PDg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*38WqB6bQpL9mrvwzCSv1og.png" /></figure><p><strong><em>POWER AND LOGARITHMIC FUNCTIONS:</em></strong></p><p><strong>6.</strong> <strong>sqrt:</strong></p><p>The sqrt(x) returns the square root of a given number.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*fjr8WQPwTsFIt8G5rlTMXw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*yWJKrNDNNBVFGwTsKwvJLA.png" /></figure><p><strong>7.</strong> <strong>pow:</strong></p><p>The pow(x,y) method returns the value of x raised to the power of y. It always returns a floating-point value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/259/1*j5uGRL0TaF39sO8XSrdppQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*a38l2AisgjHvzXCJxqWSGg.png" /></figure><p><strong>8.</strong> <strong>exp:</strong></p><p>Returns e raised to the power of x, where e is the Euler’s number (2.718281…).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*n5TEvoAnfIuHC_-Op5GDjw.png" /></figure><p><strong>9.</strong> <strong>log:</strong></p><p>Returns the log of x, where the base is given. This method accepts two arguments log(x,y). If only one argument is passed in this function, it will return a natural logarithm (Euler’s number (2.718281…) will be considered the base).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*893pi-XldvWuWBZo3AOXFw.gif" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/941/1*am0dM2AVBU7p40kyDGtfxA.png" /></figure><p><strong>10.</strong> <strong>sin, cos, tan:</strong></p><p>The sin, cos, and tan will take the degree and return the value in radians. The return value will be in floating-point</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*LwsWdlBrb3U0N-MsBbSBkQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*Lg2TLh6HISp-hayhxNBH0A.png" /></figure><p><strong>Conclusion:</strong></p><p>When I started learning Python, math was the first library I got introduced to. Initially, I faced a few hurdles while learning it, but once I learned the most used functions in the math library, it made the learning process easier. Likewise, I hope this article will help you in a way.</p><p>I have written this article from my perspective; other functions in the math library may be more helpful.</p><p>Yet to explore more functions and libraries, the sea is the end when it comes to learning. Let’s sail on it and explore.</p><p>I will come up with another article until then adios.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2ff758a06805" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aatomz-research/10-python-math-functions-confirm-that-youre-not-a-rookie-2ff758a06805">10 Python Math Functions confirm that You’re Not a Rookie…</a> was originally published in <a href="https://medium.com/aatomz-research">Aatomz Research</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>