<?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 Suleyman Zeynul on Medium]]></title>
        <description><![CDATA[Stories by Suleyman Zeynul on Medium]]></description>
        <link>https://medium.com/@zeynulsuleyman?source=rss-6f4c8ff667c8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*sIlIsVUNSTg1ZEZuf-rj3g.jpeg</url>
            <title>Stories by Suleyman Zeynul on Medium</title>
            <link>https://medium.com/@zeynulsuleyman?source=rss-6f4c8ff667c8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 00:31:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@zeynulsuleyman/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[Parquet: A Way Better Option for Data Storage]]></title>
            <link>https://zeynulsuleyman.medium.com/parquet-a-way-better-option-for-data-storage-bb3db9b5acf8?source=rss-6f4c8ff667c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb3db9b5acf8</guid>
            <category><![CDATA[cloud-storage]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[apache]]></category>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[parquet]]></category>
            <dc:creator><![CDATA[Suleyman Zeynul]]></dc:creator>
            <pubDate>Thu, 05 May 2022 19:15:01 GMT</pubDate>
            <atom:updated>2022-05-05T19:15:01.980Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*mj-je4WLDKqUhVxM" /><figcaption>Photo by <a href="https://unsplash.com/@tama66">Peter Herrmann</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>We all know and frequently use CSV file formats for data storage and datasets. What if I told you that saving data to CSVs costs both more money and disk space. In this article, I will introduce Parquet File Format.</p><p><strong>Why are CSVs cumbersome?</strong></p><p>CSV File Format is one of the most widely used file formats. It is everywhere. Companys use it for their reports. Many data professionals prefer it for their datasets. It’s a data format that’s simple and intuitive to work with. You can even create CSV files with your favorite text editing tool. However, there are some features of it that make it a bit troublesome.</p><p>First and foremost, CSVs are <strong>row-orientated</strong>. They are not lightweight, as adequate compression cannot be done for each row due to fact that one row usually contains multiple data types. Therefore, they’re slow to query and difficult to store efficiently.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*czf-u2Wud8ITuydx60xBRA.png" /><figcaption>Image 1— Dummy table data (image by author)</figcaption></figure><p>Imagine you have the above data. In row-oriented storage, it would be organized as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*l25Y_eLJ3hgH28u1GUkYxg.png" /><figcaption>Image 2 — Row-oriented data storage (image by author)</figcaption></figure><p>Secondly, anyone can open and modify a CSV file. That’s why this type of format should never be used as a database due to security and access concerns.</p><p>Last but not least it is not a wise option when it comes to <strong>time and money</strong> for data storing. In today’s world, cloud services are preferred to store data. And not surprisingly they charge based on the amount of data scanned or the amount of data stored. Neither looks good for CSVs.</p><p><strong>What is Parquet?</strong></p><p>Parquet is an <strong>open-source</strong> file format built to handle flat <strong>columnar</strong> storage data formats. It’s an alternative format for storing data and is licensed under <strong>Apache</strong>. Since it was first introduced in 2013, Apache Parquet has seen widespread adoption as a free and open-source storage format for fast analytical querying.</p><p><strong>Parquet vs. CVS</strong></p><p>Apache Parquet is a file format designed to support fast data processing for complex data, with several notable characteristics that distinguish it from CSV file format.</p><p>The main difference between Parquet and CVS is that CSVs are row storage, while Parquet files organize the data in columns meaning the values of each table column are stored next to each other, rather than those of each record.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*lrWdr8p6IS4YLlzYkycqQw.png" /><figcaption>Image 3 — Column-oriented data storage (image by author)</figcaption></figure><p>Being column-oriented enables Parquet to be optimized for performance. When running queries on your Parquet-based file system, you can focus only on the relevant data very quickly. Moreover, the amount of data scanned will be way smaller and will result in less I/O usage. For example, if you have a table with 1000 columns using Parquet files will enable you to fetch only the required columns and their values, load those in memory and answer the query. If a row-based file format like CSV was used, the entire table would have to have been loaded in memory, resulting in increased I/O and worse performance.</p><p>Secondly, Parquet provides <strong>lower storage costs</strong> for data files and <strong>maximizes the effectiveness of data querying</strong> with serverless technologies such as Amazon Athena, Redshift Spectrum, BigQuery, and Azure Data Lakes.</p><p>Let’s look at the storage pricing for Amazon S3 first:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*W57gNLJS0dT4RiPgA4EAqA.png" /><figcaption>Image 4 — Parquet vs. CVS (Source: <a href="https://blog.openbridge.com/how-to-be-a-hero-with-powerful-parquet-google-and-amazon-f2ae0f35ee04">here</a>)</figcaption></figure><p>Parquet files take much less disk space than CSVs and are faster to scan. As a result, the identical dataset is several times cheaper to store in Parquet format! Parquet is the better option not only cost-wise but speed-wise as well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*b4fAfSrRtki75pPb" /><figcaption>Photo by <a href="https://unsplash.com/@rdiazcaris">Ricardo Díaz</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>In a nutshell, Parquet is a more efficient data format for bigger files. You will save both time and money by using Parquet over CSVs.</p><p><strong>Hands-on Comparision</strong></p><p>You’ll use the <a href="https://www.kaggle.com/dgawlik/nyse?select=prices.csv"><strong>NYSE stock prices dataset</strong></a> for this hands-on part. The CSV file is around 50MB in size.</p><p>First, let’s load in the CSV file with Python’s Pandas:</p><pre>import pandas as pd<br>df = pd.read_csv(&quot;prices-split-adjusted.csv&quot;)<br>df.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/577/1*WgiJsGlgTIyIiKRnRrwsNg.png" /><figcaption>Image 5 — Head of NYSE stock prices dataset — CSV (image by author)</figcaption></figure><p>Now, let’s save it in Parquet format and see the difference. We’ll have to use the to_parquet() function to save the dataset. For the most part, it works the same as the to_csv() :</p><pre>df.to_parquet(&quot;prices-split-adjusted.parquet&quot;)</pre><pre>df_parquet = pd.read_parquet(&quot;prices-split-adjusted.parquet&quot;)<br>df_parquet.head()</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/1*xE4CW5lltgJsyuvy386zMA.png" /><figcaption>Image 6 — Head of NYSE stock prices dataset — Parquet (image by author)</figcaption></figure><p>Note: You may need to install pyarrow and fastparquetif you have not done it so already:</p><pre>pip install pyarrow<br>pip install fastparquet</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*QExwSbWXNz195C2fBliqfw.png" /><figcaption>Image 7 — CSV vs. Parquet file sizes on NYSE stock prices dataset (image by author)</figcaption></figure><p>That’s approximately four times less in disk space usage.</p><p>Probably it does not matter for 50 MB files, but it does on larger datasets. That’s especially important if you’re storing data on the cloud and paying for the overall size.</p><p><strong>Conclusion</strong></p><p>Although we all love and are familiar with CSVs, time and cost matter when you have large data and a new data format is needed. Parquet comes to our rescue in this regard. Parquet allows us to store our data in a column-oriented structure, offering more effective storage and faster querying.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb3db9b5acf8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Time Value of Money, Capital Budgeting, and Python]]></title>
            <link>https://zeynulsuleyman.medium.com/time-value-of-money-capital-budgeting-and-python-ee514cf4996b?source=rss-6f4c8ff667c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee514cf4996b</guid>
            <category><![CDATA[investment]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[money]]></category>
            <category><![CDATA[finance]]></category>
            <dc:creator><![CDATA[Suleyman Zeynul]]></dc:creator>
            <pubDate>Sat, 05 Mar 2022 18:30:42 GMT</pubDate>
            <atom:updated>2022-03-05T19:00:57.260Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Time value of money and capital budgeting are core concepts in finance. In this article, I will use Python to calculate the time value of money and analyze the profitability of some sample investment projects with Net Present Value and Internal Rate of Return.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*l1S-zvAoZMGv0AgD.jpg" /></figure><h3>Prerequisite Python Libraries</h3><p><em>I will use the </em><a href="https://numpy.org/numpy-financial/latest/"><strong><em>Python Numpy-Financial package</em></strong></a><em> to handle all the calculations required for Future Value, Present Value, Net Present Value (NPV), and Internal Rate of Return (IRR).</em></p><p><strong>NumPy-Financial </strong>—<a href="https://numpy.org/numpy-financial/"> https://numpy.org/numpy-financial/</a></p><h3><strong>1. Time Value of Money (TVM)</strong></h3><p>The time value of money (TVM) is the concept that a sum of money is worth more now than the same sum will be at a future date due to its earning potential (opportunity cost), inflation, and risk. It is also referred to as present discounted value.</p><p>To be able to understand this concept, comprehending the <strong>future</strong> and <strong>present value</strong> concepts might help.</p><p><strong>Future value (FV)</strong> is the value of a current asset at a future date based on an assumed rate of growth. The future value is important to investors and financial planners, as they use it to estimate how much an investment made today will be worth in the future. Knowing the future value enables investors to make sound investment decisions based on their anticipated needs.</p><p><strong><em>FV when simple annual interest used:</em></strong></p><p>With simple interest, it is assumed that the interest rate is earned only on the initial investment.</p><p><strong>​<em>FV </em>= <em>I</em>×(1+(<em>R</em>×<em>T</em>))</strong></p><p><em>I = Investment amount</em></p><p><em>R = Interest rate</em></p><p><em>T = Number of years​</em></p><p>For example, assume a $10,000 investment is held for five years in a savings account with 10% simple interest paid annually. FV would be $15,000 in 5 years.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sRds_lXUhNyW5rND1NeqCA.png" /></figure><p><strong><em>FV when compound annual interest used:</em></strong></p><p>With compounded interest, the rate is applied to each period’s cumulative account balance.</p><p><strong><em>FV </em>= <em>I</em>×(1+<em>R</em>)^<em>T</em></strong></p><p><em>I </em>= Investment amount</p><p><em>R </em>= Interest rate</p><p><em>T </em>= Number of years​</p><p>For example, assume a $10,000 investment is held for five years in a savings account with 10% compound interest paid annually. FV would be $16105.10 in 5 years.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uao-qJD7MXX-P76d1Lr72g.png" /></figure><p>Another example: What is the future value after 10 years of saving $100 now, with an additional monthly savings of $100. Assume the interest rate is 5% (annually) compounded monthly? In such a scenario, FV would be $15,692.93.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V35gdDbQoR62oSD9RxVfwA.png" /></figure><p><strong>Present value (PV)</strong> is the current value of a future sum of money or stream of cash flows given a specified rate of return. Future cash flows are discounted at the discount rate.</p><p><strong>Present Value = FV / (1 + r) ^ n</strong></p><p>FV = Future Value</p><p><em>r </em>= Rate of return</p><p><em>n </em>= Number of periods​</p><p>For example, consider a scenario where you expect to earn a $5,000 lump sum payment in five years’ time. If the discount rate is 8.25%, the PV would be $3,363.80.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nppuV0tLivICueyX4pLmJQ.png" /></figure><p>Another example: What is the present value (e.g., the initial investment) of an investment that needs to total $15,692.93 after 10 years of saving $100 every month? Assume the interest rate is 5% (annually) compounded monthly? In such a scenario, PV would be $100.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ddvb1eJgY314apbvPkF8zA.png" /></figure><p>Last example: What is the present value of an investment worth $2.000.00 for 25 years with the interest rate of 2.5% (annually) compounded monthly? In such a scenario, PV would be $445,814.85 (given that the ADP — Annual Percentage Rate is used to convert the annual rate into the monthly rate).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VXYE546Datu5qQ3piNb-mg.png" /><figcaption>Based on APR</figcaption></figure><p>And PV would be $447,229.15 (given that the EAR — Effective Annual Interest is used to convert the annual rate into the monthly rate).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7ebMH4R6l6YMmuRcgcvdKg.png" /><figcaption>Based on EAR</figcaption></figure><p>For more info about ADP and EAR, pls refer to: <a href="https://calculate.onl/convert-annual-interest-rates/">https://calculate.onl/convert-annual-interest-rates/</a></p><h3>2. Capital Budgeting</h3><p>Capital budgeting is a method of estimating the ﬁnancial viability of capital investment over the life of the investment. It is a deliberate planning process to determine if potential investment project(s) is worth the funding of cash through the firm’s capitalization structure. The aim of capital budgeting is to enable the decision-makers to wisely choose the project that can add value to their company.</p><p>Although there are several capital budgeting tools such as the Payback Period, Discounted Payback Period, Proﬁtability Index, Accounting Ratios, in this article, Net Present Value (NPV) and Internal Rate of Return (IRR) will be introduced.</p><p>The <strong>Net Present Value (NPV)</strong> method involves discounting a stream of future cash ﬂows back to present value. The cash ﬂows can be either positive (cash received) or negative (cash paid). Accept investments with a positive NPV and reject investments with a negative NPV.</p><p><strong>NPV = Present Value of Cash Inflows-Present Value of Cash Outflows</strong></p><p>The formula of NPV is as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*mLCVGW2PikkXZb3q8tIu8Q.png" /></figure><p>Let’s imagine we have a project with a proposed initial investment capital of $150,000. We expect the project will generate revenues of $15000, $28000, $35000, $22000, $45000 in the coming five years.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/316/1*O8M3Iwcsks72kQin5HCVnQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tzH-AWch9SrWG22f4IylXw.png" /></figure><p>Since the NPV is negative, it is wise to avoid such an investment. If we invest $100,000 instead of $150,000 given that the cash inflows would be the same as above then we will have a profit from such an investment. In other words, it is wise to invest in such a project given that other factors are also plausible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*83XklL8g68B614TPYGMKGg.png" /></figure><p>The<strong> Internal Rate of Return (IRR)</strong> is the rate of return from the capital investment. In other words, the Internal Rate of Return is the discount rate that makes the Net Present Value equal to zero.</p><p>The formula of IRR is as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*Yg3I7eiR7ZlU5qLTjeUVpg.png" /></figure><p>Accept investments if the Internal Rate of Return is greater than the Threshold Rate of Return and reject investments if the Internal Rate of Return is less than the Threshold Rate of Return.</p><p>For the project above, the Threshold Rate of Return is 5% and the IRR is 14%. This means the current project has a relatively high cash flow resiliency and therefore it can be considered a low-risk project. The higher the IRR the lower the risk of the project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-3vt40-zq398gXfETZfrJw.png" /></figure><h3>Conclusions</h3><p>In this article, I introduced the concept of the time value of money (TVM) and the two most common capital budgeting tools (Net Present Value and Internal Rate of Return). Although capital budgeting tools are helpful when it comes to evaluating the profitability of an investment, none of them can guarantee a profitable project as all the methods are only aimed to offer the best forecast based on the currently available info and presumptions.</p><h3>References</h3><ol><li><a href="https://www.extension.iastate.edu/agdm/wholefarm/html/c5-240.html#:~:text=There%20are%20several%20capital%20budgeting,Modi%EF%AC%81ed%20Internal%20Rate%20of%20Return">https://www.extension.iastate.edu/agdm/wholefarm/html/c5-240.html#:~:text=There%20are%20several%20capital%20budgeting,Modi%EF%AC%81ed%20Internal%20Rate%20of%20Return</a>.</li><li><a href="https://www.investopedia.com/articles/financial-theory/11/corporate-project-valuation-methods.asp">https://www.investopedia.com/articles/financial-theory/11/corporate-project-valuation-methods.asp</a></li><li><a href="https://calculate.onl/convert-annual-interest-rates/">https://calculate.onl/convert-annual-interest-rates/</a></li><li><a href="https://www.investopedia.com/terms/p/presentvalue.asp">https://www.investopedia.com/terms/p/presentvalue.asp</a></li><li><a href="https://www.investopedia.com/terms/f/futurevalue.asp#:~:text=Future%20value%20(FV)%20is%20the,be%20worth%20in%20the%20future.">https://www.investopedia.com/terms/f/futurevalue.asp#:~:text=Future%20value%20(FV)%20is%20the,be%20worth%20in%20the%20future.</a></li><li><a href="https://numpy.org/numpy-financial/">https://numpy.org/numpy-financial/</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee514cf4996b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Activate GitHub Education Pack]]></title>
            <link>https://zeynulsuleyman.medium.com/how-to-activate-github-education-pack-984808b4d511?source=rss-6f4c8ff667c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/984808b4d511</guid>
            <category><![CDATA[github-student-pack]]></category>
            <dc:creator><![CDATA[Suleyman Zeynul]]></dc:creator>
            <pubDate>Sun, 08 Aug 2021 00:08:03 GMT</pubDate>
            <atom:updated>2021-08-08T00:08:03.999Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello, everyone! In this article, I will present you how to activate your <strong>GitHub student package</strong> and enjoy the rich contents of almost all well-known online courses, hosting and domain management, cloud hosting and service, coding, and design platforms such as Datacamp, DigitalOcean, Canva, educative, MongoDB, and whatnot. You can get ahead in your career and access the best tools used in the industry, for free, with the GitHub Student Developer Pack (the Pack). So, let’s start.</p><p>First and foremost search for “GitHub education pack” in your browser and click on the first link or just go to this page — &gt;<a href="https://education.github.com/pack">GitHub Student Developer Pack — GitHub Education</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w86WhG-WSOZVvO9Wi_FWow.png" /></figure><p>Now, choose Github Student Developer Pack.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KF1iZ8ytwuM5VBMUu01Z8w.png" /></figure><p>On the following page, click on the <strong>Get your package</strong> button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FDKmtTIm7jFrORt37BR7Ew.png" /></figure><p>Then choose student benefits.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*siUX-X6nDaG1s2ujZ_ia4g.png" /></figure><p>On the next page, if you do not have a GitHub account, create an account and then provide an email that is provided by your school by clicking on <strong>here </strong>link.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/684/1*9IiTRsB7PZvCx37Qm5e2ig.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7DQX5v319qzNh0vYi4Dlhg.png" /></figure><p>After providing your email, verify the email sent by GitHub to your inbox (the one in your email provided by your school).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/983/1*ldUq76ekU3qqdPb0vb7WKg.png" /></figure><p>You need to see <strong>Your email was verified</strong> notification in the top left corner of your GitHub page upon verifying your email address.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8a1YJHHp4hTaDd19x6JvDA.png" /></figure><p>And finally, mark your school-provided email, provide your purpose usage in the given box, and then hit on the <strong>Continue </strong>button (You may see <strong>Submit your information</strong> button since it is your first time).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*-iE7eqYSyhIAiu8giMvrsw.png" /></figure><p>Here, you can browse platforms by their categories and see lots of different platforms that provide different content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*ty5PwGhi-q-QibSYiSMCFg.png" /></figure><p>You can see the details of each platform below each platform&#39;s box.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*tPuSIbnCzp1hfYXn54nbNA.png" /></figure><p>Now it is time to enjoy lots of rich content for free and enhance your knowledge in whatever field you like. Have fun reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=984808b4d511" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basic Data Analysis with Python]]></title>
            <link>https://zeynulsuleyman.medium.com/basic-data-analysis-with-python-cdf8181d636a?source=rss-6f4c8ff667c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/cdf8181d636a</guid>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[eda]]></category>
            <category><![CDATA[matplotlib]]></category>
            <category><![CDATA[seaborn]]></category>
            <dc:creator><![CDATA[Suleyman Zeynul]]></dc:creator>
            <pubDate>Sun, 11 Jul 2021 17:29:03 GMT</pubDate>
            <atom:updated>2021-07-11T17:29:03.671Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello there! In this article, I will look at what one should pay attention to in Python basic data analysis.</p><p>The first thing one should do before starting data analysis is to import the main libraries that will be used.</p><p>The main libraries used for data analysis are pandas, NumPy, and matplotlib. Of these, pandas and NumPy allow one to operate on the data, while the matplotlib library allows one to visualize the data and visually gives an idea of how the data is related. There are also other visualization libraries such as seaborn and plotly.</p><p><strong>Importing Libraries</strong></p><p>Libraries are imported with the <em>import</em> command. After the import command, the library to be imported is written. The <em>as</em> command that is written after the library name helps one to specify an alias for the library that will be imported.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*0mQQbftezm4xIjUa91bIYw.png" /></figure><p><strong>Uploading Datasets</strong></p><p>There are some critical points to be taken into consideration while uploading datasets. These are;</p><p>1-The file format of the dataset and the format one wants to read in should be the same.</p><p>2- The dataset and the python worksheet one works on should be in the same folder.</p><p>Main reading in and file formats available in pandas are;</p><p>· <strong><em>CSV:</em></strong> read_csv,</p><p>· <strong><em>MS Excel:</em></strong> read_excel</p><p>· <strong><em>JSON:</em></strong> read_json,</p><p>· <strong><em>HTML:</em></strong> read_html,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*_TGzAwEFEWB-0mP74tz8Ag.png" /></figure><p>See pandas <a href="https://pandas.pydata.org/pandas-docs/stable/user_guide/io.html">documentation </a>for more file formats.</p><p><strong>Steps to be Followed in Exploratory Data Analysis (EDA)</strong></p><p>After reading in the data with pandas, making some checks is important in terms of the accuracy of the data and the operations to be performed on it. It should be noted that the majority of time spent in EDA is allocated to this step.</p><p>One of the first things one should pay attention to when working with data analysis libraries is the type of data worked on. Series and DataFrame are fundamental data types used in Data analysis.</p><p>While <strong>Series</strong> consists of a single index such as [1,2,3,4,5], <strong>DataFrames</strong> consists of multiple Series.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/654/1*7r4Kv0O25kILip_kWjTIFg.png" /></figure><p>With the type() method, one can easily check the type of data. If the data is not in the suitable format for a specific analysis, it is necessary for one to convert it to the required format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*BduZ9Kxy1xHQjsb7fmur6A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*nwYCxt40D4B7gzMdApn_0A.png" /></figure><p>With data = pd.DataFrame(data) , a given data can be converted to a DataFrame.</p><p><strong>Returning the Rows</strong></p><p><strong>head()</strong></p><p>The head()method is used when one works with large data sets or when one wants to have a quick look at the data. This method displays however many rows one wants to be displayed starting from the top. It is enough to write how many rows one wants to see in parentheses. By default, it returns the first five rows.</p><p>df_past.head()</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*KmodIHgaxrvQCWeH9G6ZGA.png" /></figure><p>df_past.head(2)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*Gf8q4vFAjl4rG-NWjrc0SA.png" /></figure><p><strong>tail()</strong></p><p>Another method used when returning rows of data is the tail()method. This method displays however many rows one wants to be displayed starting from the last row. It is enough to write how many rows one wants to see in parentheses. By default, it returns the last five rows.</p><p>df_past.tail()</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*P7Je0mPIr_130vJiaT-k1g.png" /></figure><p>df_past.tail(3)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*tFbJbdHljCBeSNf6Tnrr2g.png" /></figure><p><strong>Checking rows and columns — columns() and axes()</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*FLlma4wZvIfENe5FSztjvA.png" /></figure><p>df_past.columns</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*R_3AU1OqPNeAZIqJLfEOlQ.png" /></figure><p>df_past.axes</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*j6yx-1ypPi26AVBYECva6Q.png" /></figure><p><strong>Checking Shape of Dataset with shape()</strong></p><p>It shows how many rows and columns the data consists of. The first value in the displayed result is the number of rows and the second is the number of columns. The number of rows and columns of data is crucial in some operations that will be executed on the data.</p><p>df_past.shape</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*euAMd1YLMAUw1jCrHxoI_Q.png" /></figure><p><strong>Summary Information About Data with info()</strong></p><p>The info() command displays how many columns a given dataset consists of, what type of variables it has, and whether there is any empty (NaN) value in the data.</p><p>df_past.info()</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*GBlbcjJFKA9wF2TE3w1unA.png" /></figure><p><strong>astype()</strong></p><p>One can check the type of variables with the info()command. Sometimes, while reading in files, numeric values may appear as strings, and string values may appear as numeric values.</p><p>Such errors may be caused by a read-in error while importing excel, CSV files. For this, after checking variables, one can convert the variable type to the type that is suitable for a specific data analysis.</p><p>In the following dataset, the <em>timestamp </em>column seems to be in object type. To be able to work on it in terms of date and time analysis, one needs to convert its type to datetime64.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/611/1*rTOH1cQjmGR_-YR2U2g00g.png" /></figure><pre>df[&quot;timestamp&quot;] = df[&quot;timestamp&quot;].astype(&quot;datetime64&quot;)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*ka4LvoWj7fAs62tbNrZxpg.png" /></figure><p><strong>Deleting null &amp; NaN values — dropna()</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*Z_UnNvxJrZTcaQv4Ay9A9w.png" /></figure><p>It can be observed in the above dataset that there are some NaN values. These NaN values are not desirable for data analysis. Therefore, NaN values are avoided as much as possible or they are replaced.</p><p>There are many functions in the pandas library for NaN values. One of them is dropna(), which removes all NaN values.</p><p>df.dropna()</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*syzxWAhqYfOEtptp0RHhnA.png" /></figure><p>When dropna()is applied, it can be seen that the rows that have NaN values have been deleted. Now let’s recheck the dataset again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*Kar7rhts2OTcoHDXOpvHDg.png" /></figure><p>Looking at the above data again, it can be seen that NaN values are back. This is because pandas require the <em>inplace</em> parameter to be True in order for some changes to be permanent. It is a kind of precaution for protecting rows or columns from inadvertent deletion.</p><p>If one accidentally deletes any of the data with the inplace=True command, the working file should be rerun to undo the change.</p><p>df.dropna(inplace=True)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*_5iT1uas5Id7z1De12Bdag.png" /></figure><pre>data.dropna(how=&quot;any&quot;)</pre><pre># It deletes rows with any NaN value. For a permanent deletion inplace=True must be added or data must be reassigned.<br>data.dropna(how=&quot;any&quot;,inplace=True)<br>data = data.dropna(how=&quot;any&quot;)</pre><pre>data.dropna(how=&quot;all&quot;)<br># It deletes rows whose all values are NaN.</pre><pre>data.dropna(subset=[&quot;name&quot;])<br># It applies dropna() to only a given column.</pre><pre>df.dropna(axis=1) # by default, axis=0<br># It drops NaN values in columns.</pre><pre>df.dropna(thresh=4)<br># It drops NaN values in rows, which does not have at least 4 non-null values.</pre><p><strong>Replacing Missing or NaN values — fillna()</strong></p><p>For the majority of the time, deleting NaN values is not suggested. Instead of deletion, replacement may be a better option. In such cases, fillna() comes into play.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*14iJcnY8lBPtepgHljmbyg.png" /></figure><p>One can fill all NaN values in whole data with fillna().</p><p>df.fillna(value=”NEW VALUE”)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*YwRLEwGaxnkh7JNktdtQFw.png" /></figure><p>Columns can be filled individually with fillna().</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*HJy6rwOngo8CgexGTX2hKA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*eCqE0hdpz4WhZFYz2LUzlw.png" /></figure><p>As is the case with dropna(), for fillna() changes to be permanent, inplace=True must be added or DataFrame must be reassigned.</p><p>Thank you for sparing time and read it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cdf8181d636a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is a List in Python and How to Use It?]]></title>
            <link>https://zeynulsuleyman.medium.com/what-is-a-list-in-python-and-how-to-use-it-dfdaead6abf4?source=rss-6f4c8ff667c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/dfdaead6abf4</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[collection]]></category>
            <category><![CDATA[lists]]></category>
            <dc:creator><![CDATA[Suleyman Zeynul]]></dc:creator>
            <pubDate>Thu, 03 Jun 2021 21:30:01 GMT</pubDate>
            <atom:updated>2021-06-03T21:40:48.584Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Python Collections (Arrays)</strong></h3><p>There are 4 different types of lists in Python. These are <strong>List</strong>, <strong>Tuple</strong>, <strong>Set</strong>, and <strong>Dictionary</strong> data types.</p><p><strong>List</strong>: Its elements can be sorted, updated, and each element can be repeated more than once.</p><p><strong>Tuple</strong>: Its elements can be sorted but not updated, and each element can be repeated more than once.</p><p><strong>Set</strong>: Its elements cannot be sorted or indexed, and no repetition is allowed.</p><p><strong>Dictionary</strong>: It takes elements in the form of key and value. There cannot be more than one element with the same key.</p><h3><strong>List in Python</strong></h3><p>Each character in the String data type is an element of this collection, and we can access each element by its index number. With the same logic, we can group information in different data types instead of a single character in the list data type. As with strings, each element can be indexed.</p><p><strong><em>Example</em></strong></p><p>message = ‘Hello There. My name is Suleyman Zeynul’.split()</p><p>print(message) # [‘Hello’, ‘There.’, ‘My’, ‘name’, ‘is’, ‘Suleyman’, ‘Zeynul’]</p><p>print(message[0]) # Hello</p><p>We can convert a character string named message into a list with the <strong>string.split()</strong> method, and if we print the element with index 0 we see the expression ‘Hello’. Because now we have turned the string data type into a list.</p><p><strong>Defining a List</strong></p><p>Each of the list elements can be of different data types.</p><p><strong><em>Example</em></strong></p><pre>list1 = [1,2,3]  # all is integer data type</pre><pre>list2 = [&#39;one&#39;,2, True, 5.6]  # string, integer, boolean, and float</pre><p>While all of the first list elements are of the same data type, the second list elements can be defined in different data types, so Python lists may not have a homogeneous structure.</p><p>We can group two different lists into one list.</p><p><strong><em>Example</em></strong></p><pre>list1 = [&#39;one&#39;,&#39;two&#39;,&#39;there&#39;]</pre><pre>list2 = [&#39;four&#39;,&#39;five&#39;,&#39;six&#39;]</pre><pre>numbers = list1 + list2 # [&#39;one&#39;,&#39;two&#39;,&#39;there&#39;,&#39;four&#39;,&#39;five&#39;,&#39;six&#39;]</pre><p>We can define different lists within the list.</p><p><strong><em>Example</em></strong></p><pre>list1 = [[1,2,3],[4,5,6],[7,8,9],10]</pre><p>In this case, we can see that there are 4 elements in the list1, the first 3 elements are a list, and the fourth element is an integer.</p><p><strong><em>Example</em></strong></p><pre>userA = [&#39;Suleyman&#39;, 25]</pre><pre>userB = [&#39;Alex&#39;, 26]</pre><pre>users = [userA, userB]</pre><p>Here, we can first define each user information in a separate list and then group them in another list called users.</p><p><strong>Number of Elements in Lists</strong></p><p>We can find the number of elements in Python lists with the <strong>len()</strong> method. We can use the same method in string and find out the number of characters.</p><p><strong><em>Example</em></strong></p><pre>list1 = [&#39;one&#39;,&#39;two&#39;,&#39;there&#39;]</pre><pre>list2 = [[1,2,3],[4,5,6],[7,8,9],10]</pre><pre>print(len(list1)) # 3</pre><pre>print(len(list2)) # 4</pre><p><strong>Accessing List Elements</strong></p><p>We can access each element in Python lists by index number starting from 0 from the left. Likewise starting from -1 from the right, we can access any element we want.</p><p><strong><em>Example</em></strong></p><pre>message = [&#39;Hello&#39;, &#39;There.&#39;, &#39;My&#39;, &#39;name&#39;, &#39;is&#39;, &#39;Suleyman&#39;, &#39;Zeynul&#39;]</pre><pre>print(message[2])   # My</pre><pre>print(message[4])   # is</pre><pre>print(message[-1])  # Zeynul</pre><pre>print(message[-3])  # is</pre><p>Likewise, when we define another list within the list, we need to use <strong>[ ]</strong> in the sub-list element.</p><p><strong><em>Example</em></strong></p><pre>liste = [[1,2,3],[4,5,6],[7,8,9],10]</pre><pre>print(liste[0])     # [1,2,3]</pre><pre>print(liste[1][2])  # 6</pre><p><strong><em>Example</em></strong></p><pre>names = [&#39;ahmet&#39;,&#39;mehmet&#39;,&#39;cenk&#39;]</pre><pre>surnames = [&#39;yılmaz&#39;,&#39;turan&#39;,&#39;durmus&#39;]</pre><pre>result = names[0] +&#39; &#39;+ surnames[0]  # ahmet yılmaz</pre><pre>result = names[1] +&#39; &#39;+ surnames[1]  # mehmet turan</pre><p><strong>Accessing List Elements with “loops”</strong></p><p>We have learned how to access list elements with index numbers, but it can be difficult to access each element individually with index numbers, so we sometimes want to access list elements by <strong>loops</strong>.</p><pre>names = [&#39;ahmet&#39;,&#39;mehmet&#39;,&#39;cenk&#39;]</pre><pre><strong>for</strong> name <strong>in</strong> names:</pre><pre>print(name)</pre><p>Here, each element in the 3-element names list is assigned to the name variable, respectively, and printed to the screen with the<strong> print()</strong> method.</p><p><strong>List Slicing</strong></p><p>Instead of selecting a single element from the list, we can specify a range and select that range.</p><p><strong><em>Example</em></strong></p><pre>message = [&#39;Hello&#39;, &#39;There.&#39;, &#39;My&#39;, &#39;name&#39;, &#39;is&#39;, &#39;Suleyman&#39;, &#39;Zeynul&#39;]</pre><pre>print(message[0:2])  # [&#39;Hello&#39;, &#39;There.&#39;]</pre><p>Elements within the index range 0 and 2 are selected. While index 0 is included, index 2 is left outside.</p><p><strong><em>Example</em></strong></p><pre>message = [&#39;Hello&#39;, &#39;There.&#39;, &#39;My&#39;, &#39;name&#39;, &#39;is&#39;, &#39;Suleyman&#39;, &#39;Zeynul&#39;]</pre><pre>print(message[:2])  # [&#39;Hello&#39;, &#39;There.&#39;]</pre><p>By specifying <strong>[:2]</strong> here, we command Python to start from the beginning and go up to the 2nd index.</p><p><strong><em>Example</em></strong></p><pre>message = [&#39;Hello&#39;, &#39;There.&#39;, &#39;My&#39;, &#39;name&#39;, &#39;is&#39;, &#39;Suleyman&#39;, &#39;Zeynul&#39;]</pre><pre>print(message[2:])  # [&#39;My&#39;, &#39;name&#39;, &#39;is&#39;, &#39;Suleyman&#39;, &#39;Zeynul&#39;]</pre><p>Here, by specifying <strong>[2:]</strong> we command Python to start from the second index (including the starting index) and go to the end (including the last element).</p><p><strong><em>Example</em></strong></p><pre>message = [&#39;Hello&#39;, &#39;There.&#39;, &#39;My&#39;, &#39;name&#39;, &#39;is&#39;, &#39;Suleyman&#39;, &#39;Zeynul&#39;]</pre><pre>print(message[-3:-1])  # [&#39;is&#39;, &#39;Suleyman&#39;]</pre><p>Here, by specifying -3, we command Python to start from index -3 (inclusive) and go up to -1 index (not included).</p><p><strong><em>Example</em></strong></p><pre>message = [&#39;Hello&#39;, &#39;There.&#39;, &#39;My&#39;, &#39;name&#39;, &#39;is&#39;, &#39;Sadık&#39;, &#39;Turan&#39;]</pre><pre>print(message[::])  #  [&#39;Hello&#39;, &#39;There.&#39;, &#39;My&#39;, &#39;name&#39;, &#39;is&#39;, &#39;Sadık&#39;, &#39;Turan&#39;]</pre><p>By specifying <strong>[::]</strong> we select the entire list.</p><p><strong>Updating List Elements</strong></p><p>To update the list elements, we first need to specify the element, which we want to update.</p><p><strong><em>Example</em></strong></p><p>list1 = [‘one’,’two’,’there’]</p><p>list1[1] = ‘updated’</p><p>print(list1) # [‘one’,’updated’,’there’]</p><p>We select the element in the 1st index and update it with the ‘updated’ string.</p><p><strong>Python List Examples</strong></p><p>1- Let’s create a list with the elements “BMW, Mercedes, Opel, Mazda”.</p><p>cars = [‘BMW’,’Mercedes’,’Opel’,’Mazda’]</p><p>2- How many elements does the list have?</p><pre>result = len(cars)  # result = 4</pre><p>3- What is the first and last element of the list?</p><p>result = cars[0] # ‘BMW’</p><p>result = cars[3] # ‘Mazda’</p><p>result = cars[-1] # ‘Mazda’</p><p>4- Replace Mazda with Toyota.</p><p>cars[-1]= ‘Toyota’</p><p>cars = [‘BMW’, ’Mercedes’, ’Opel’, ’Toyota’]</p><p>5- Is Mercedes an element of the list?</p><p>result = ‘Mercedes’ <strong>in</strong> cars</p><p><strong>print</strong>(result) # True</p><p>6- What is the element in the -2 index of the list?</p><p>result = cars[-2]</p><p>print(result) # Opel</p><p>7- Return the first 3 elements of the list.</p><pre>result = cars[0:3]  # &#39;BMW&#39;,&#39;Mercedes&#39;,&#39;Opel&#39;</pre><p>result = cars[:3] # ‘BMW’, ’Mercedes’, ’Opel’</p><p>result = cars[-2:] # ‘BMW’, ’Mercedes’, ’Opel’</p><p>8- Update the last 2 elements of the list with “Toyota” and “Renault”.</p><pre>cars[-2:] = [&#39;Toyota&#39;,&#39;Renault&#39;]</pre><p>9- Add “Audi” and “Nissan” to the list.</p><p>result = cars + [‘Audi’,’Nissan’]</p><p>10- Delete the last element of the list.</p><p><strong>del</strong> <strong>cars</strong>[-1]</p><p>11- Print the list elements in reverse.</p><p>result = cars[::-1]</p><p>12- Store the following data in a list.</p><p># studentA: Alex Smith 2010, (70,60,70)</p><p># studentB: Arda Turan 1999, (80,80,70)</p><p># studentC: James Jeffery 1998, (80,70,90)</p><p>studentA = [‘Alex’,’Smith’,2010,[70,60,70]]</p><p>studentB = [‘Arda’,’Turan’,1999,[80,80,70]]</p><p>studentC = [‘James’,’Jeffery’,1998,[80,70,90]]</p><p>13- Print the list elements.</p><p>result = studentA[0]</p><p>result = studentB[1]</p><p>result = studentC[3][1]</p><p>result = f”{studentA[0]} {studentA[1]} {2019-studentA[2]} years old and his avrage grade is {(studentA[3][0] + studentA[3][1] + studentA[3] [2])/3}.”</p><p>print(result) # Alex Smith 9 years old and his avrage grade is 66.66666666666667.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dfdaead6abf4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Science and Algorithm in Finance]]></title>
            <link>https://zeynulsuleyman.medium.com/data-science-and-algorithm-in-finance-9b69ebda5b4e?source=rss-6f4c8ff667c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b69ebda5b4e</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Suleyman Zeynul]]></dc:creator>
            <pubDate>Mon, 31 May 2021 16:57:41 GMT</pubDate>
            <atom:updated>2021-06-02T21:13:43.539Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*1FbnUfVx6NhT-oZVA_oK1Q.png" /></figure><p>Data Science is defined by many authorities as the new oil and the new gold in today’s world. Whatever analogy you use to describe the value of data will probably be true. So, what is data science and how can we use the data that we easily access and store with the advancement of technology in the financial world through an algorithm? We will try to answer these questions in this article.</p><p>There are several definitions that are used to describe what data science is. IBM defines data science as a <em>multidisciplinary approach to extracting actionable insights from the large and ever-increasing volumes of data collected and created by today’s organizations.</em><a href="#_ftn1"><strong><em>[1]</em></strong></a><em> </em>According to Investopedia’s definition data science provides meaningful information based on large amounts of complex data or <a href="https://www.investopedia.com/terms/b/big-data.asp">big data</a>. Data science, or data-driven science, combines different fields of work in statistics and computation to interpret data for decision-making purposes.<a href="#_ftn2">[2]</a> In short, data science is an approach to derive meaningful insights from colossal volumes of data so that appropriate actions can be taken.</p><p>A list can be made on the use of data science in the financial sector. It can be used to address the problems of the financial world in many fields ranging from customer advice to business strategies. Let’s take a look at such a list together.</p><p><a href="#_ftnref1">[1]</a> <a href="https://www.ibm.com/cloud/learn/data-science-introduction">https://www.ibm.com/cloud/learn/data-science-introduction</a></p><p><a href="#_ftnref2">[2]</a> <a href="https://www.investopedia.com/terms/d/data-science.asp">https://www.investopedia.com/terms/d/data-science.asp</a></p><p><strong>Risk Management &amp; Evaluation</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*iUxu8oUJfaK3OTaJSQc_Dw.jpeg" /></figure><p>Risk management is an extremely important area for financial institutions and companies in terms of security, reliability, and strategic decisions making processes. It is due to the fact that risks stem from multiple sources as such customers, rivals, investors, etc. The size, type, and severity of these risks can vary.</p><p>Data science and machine learning can classify risks according to their sources or predict potential loss. Algorithms programmed in evaluating a large number of customer data, financial debt settlement, and insurance policies not only increase the efficiency of risk scoring models but also improve cost efficiency and sustainability.</p><p><strong>Customer Analysis</strong></p><p>By monitoring the online behavior of customers, it is possible to understand and predict the customer approaches to certain products. This can increase the launch of new products. Through this, financial institutions can foresee potential reactions of their potential customers to new products even before launching them in the market.</p><p>In addition, data science can create a model that predicts the probability of responding positively to a promotion or offer by evaluating behavioral, demographic, and historical purchasing data of customers. Thus, companies can improve their relationships with their customers.</p><p><strong>Prediction Analysis</strong></p><p>With the emerge of new data tools and models, analytics is now at the center of financial services at an ever-growing pace. <em>By monitoring social media, news reports, and other information sources, these advanced analytics conquered core applications such as forecasting costs and lifetime value for consumers, potential life events, predicted turnover, and stock market movements.</em><a href="#_ftn1">[1]</a> Additionally, these approaches can reduce the timeline between action and reaction to properly intervene.</p><p><a href="#_ftnref1">[1]</a> <a href="https://codersera.com/blog/8-best-examples-of-data-science-in-finance/">https://codersera.com/blog/8-best-examples-of-data-science-in-finance/</a></p><p><strong>Fraud Analysis</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*IYeDrF-q3khV2XYpRAWW8A.jpeg" /></figure><p>By leveraging big data technologies, companies can efficiently manage their resources, make smarter decisions and improve their performance in detecting frauds. For example, by using machine learning, credit cards, accounting, and insurance frauds can be effectively detected and prevented. Proactive fraud detection in banking is required to provide security to customers and employees.</p><p><strong>Personalization and Customization</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*9B1Jn7KtlzpGSFziDaGbGQ.jpeg" /></figure><p>All customers’ attitudes, preferences, behaviors, or personal information can be determined and divided into groups by data science algorithms. This grouping enables the development of relevant attitudes and solutions, especially for customers’ specific needs and preferences. As a result, cross-selling policies can be developed and personal services can be tailored for each customer segment or even for each customer instead of providing services based on broader groups.</p><p>To sum up, data science offers a tremendous chance for financial firms to stay ahead of the competition and rebuild their companies by enabling them to make more appropriate and timely decisions with risk evaluation, fraud, prediction, and customer analysis, and personalization. And it is not hard to foresee that the role of data science and data scientist is going to dominate the finance sector in years to come.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b69ebda5b4e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Return all Possible Permutations of Elements of a Given List in Python]]></title>
            <link>https://zeynulsuleyman.medium.com/how-to-return-all-possible-permutations-of-elements-of-a-given-list-in-python-6a3558002e3c?source=rss-6f4c8ff667c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/6a3558002e3c</guid>
            <dc:creator><![CDATA[Suleyman Zeynul]]></dc:creator>
            <pubDate>Mon, 17 May 2021 15:50:10 GMT</pubDate>
            <atom:updated>2021-05-17T15:50:10.019Z</atom:updated>
            <content:encoded><![CDATA[<p>It is highly probable that some of us as IT-related job-seekers have already or will encounter questions like the one below :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/477/1*X_SMpEqLT6kH_1pVtMpvWw.png" /></figure><p>The reason such a question is asked is that the interviewer(s) want(s) to test our algorithms skills. Therefore, it should be solved in the scope of PythonBasic without importing any module, function such as itertools,<br>permutations(). I have solved it in two different ways.</p><h3># Solution 1:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*MwLkT-cgTatYaLpOLO1ebw.png" /></figure><h3># Solution 2:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*dKYdrc7DqATqCXv-gcJoIg.png" /></figure><p>Both solutions the challenge above contain the generic solution which allows us to test all possibilities of the length of the elements. In other words, we can add new objects to the samp_list to see all possible permutations. I hope these two solutions will help you to solve alike chanllanges.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6a3558002e3c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Sum Digits Values of List Objects in Python]]></title>
            <link>https://zeynulsuleyman.medium.com/how-to-sum-digits-values-of-list-objects-in-python-feb015b7a58f?source=rss-6f4c8ff667c8------2</link>
            <guid isPermaLink="false">https://medium.com/p/feb015b7a58f</guid>
            <dc:creator><![CDATA[Suleyman Zeynul]]></dc:creator>
            <pubDate>Mon, 17 May 2021 12:30:32 GMT</pubDate>
            <atom:updated>2021-05-17T12:30:32.453Z</atom:updated>
            <content:encoded><![CDATA[<p>The sum of the digits of a number means adding up each of the digits and returning the sum. For instance, the sum of the digits 245 is 11. Since I have started to write codes in Python in my IT-Bootcamp, I have frequently found myself struggling to get the summation of digit values of numbers within a given list. I strongly believe that this is common for all other Python beginners as well. So, let’s discuss certain ways in which this problem can be solved.</p><h3>First Method: for loop + str</h3><p>As it is a well-known fact, we cannot iterate digits of an integer type of data. By using for loop + str method we run a loop for each element, convert each digit to string, and perform the count of the sum of each digit. Below is an example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/1*r5cHUoaXtSFu6KymgUtxcA.png" /><figcaption>An example for “for loop + str” method</figcaption></figure><h3>Second Method: sum() + list comprehension</h3><p>We can get the same results using built-in function sum() and list comprehension. In this method, the sum() is used to compute summation, and list comprehension is used to compute iterations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/1*iLGFzFaBga1nadEl3HJ8TQ.png" /><figcaption>An example for “sum() + list comprehension”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*YHflownsMudsnlJ502TJow.png" /><figcaption>Output for the above example</figcaption></figure><p>I hope these two methods will help you solve the summation of digits in your practice challenges.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=feb015b7a58f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>