---
title: "Discussion on \"Cleaning Splits and Bonus Data Using Python and Calculating Their Factors!\" | Hashnode"
description: "Discussion on \"Cleaning Splits and Bonus Data Using Python and Calculating Their Factors!\". The most detailed implementation that's available on the Internet!"
url: "https://hashnode.com/posts/cleaning-splits-and-bonus-data-using-python/6075cfd99c6b4f29eaec1d41"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Cleaning Splits and Bonus Data Using Python and Calculating Their Factors!](https://tradewithpython.hashnode.dev/cleaning-splits-and-bonus-data-using-python?utm_source=hashnode&utm_medium=feed)

The most detailed implementation that's available on the Internet!

Apr 13, 2021 · 6 min read · tradewithpython.hashnode.dev  
Updated Sep 2, 2023  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#python3](https://hashnode.com/tag/python3)
-   [#python-projects](https://hashnode.com/tag/python-projects)
-   [#python-beginner](https://hashnode.com/tag/python-beginner)
-   [#100daysofcode](https://hashnode.com/tag/100daysofcode)

## Written by

[Yash Roongta](https://hashnode.com/@yash12392)

@yash12392 · London, United Kingdom

  
[View profile](https://hashnode.com/@yash12392)

Finance & Coding Enthusiast

I am a CFA and FRM Charterholder. I used to work as a Portfolio Implementation Manager for Aviva Investors managing £3bn+in Assets Under Management in the UK. I am very passionate about educating people on how they can make more money with their existing investments sustainably.

## Responses 4

Markdown supported · ⌘↵ to post

[Arvind Hatkar](https://hashnode.com/@arvindhatkar)

[Dec 4, 2022](https://hashnode.com/posts/cleaning-splits-and-bonus-data-using-python/6075cfd99c6b4f29eaec1d41/comment/638c9e8b4a96bb8fda438ca0)

I have tried all what you implemented, thankyou very much. I have tried to implement further, i.e. applying Dividend/Split/Bonus to stocks, but failed, because of series changes from EQ to BE and BE to EQ frequently. Is there any OHCL Adjusted (Dividend/Split/Bonus etc.) Price Data Provider from year 2000.

[Srinivas Maheedhar](https://hashnode.com/@Mahi9)

[Sep 5, 2022](https://hashnode.com/posts/cleaning-splits-and-bonus-data-using-python/6075cfd99c6b4f29eaec1d41/comment/6315f367d54563f8b19afa6f)

Thanks Yash...excellent stuff, this very useful. I was not aware of the split/bonus info available as a file in BSE....that's saves a lot of time and effort (have experienced pain) of collecting it from other places in past. One question: If we have say 200 stocks that we have applied splits and bonuses adjustment...we want to check the smoothness price data (or correct application of splits/bonuses). Is there a way to do it with pandas? or would we have to check visually in plots

[Srinivas Maheedhar](https://hashnode.com/@Mahi9)

[Sep 5, 2022](https://hashnode.com/posts/cleaning-splits-and-bonus-data-using-python/6075cfd99c6b4f29eaec1d41/comment/6315f367d54563f8b19afa6f#reply-6316357b360c57fcaa77bfb8)

Example: I am using nsepy lib and for some reason it did not fetch any data from Sep 16th 2021 to 31st march 2022.

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1662399856289/zw3e4-N7-.png)

[SURAJSINGH RAJPUT](https://hashnode.com/@Robonized)

[Oct 15, 2021](https://hashnode.com/posts/cleaning-splits-and-bonus-data-using-python/6075cfd99c6b4f29eaec1d41/comment/6169a23c53401f641ba1864a)

I enjoyed all the 7 articles, learnt a lot. Finish it off with making the adjustments to the price data.

You also mentioned that there is a better way to store this data than saving it as a csv.

Am eagerly waiting for the next article of this series.

Keep rocking!

[Yash Roongta](https://hashnode.com/@yash12392)

[Oct 15, 2021](https://hashnode.com/posts/cleaning-splits-and-bonus-data-using-python/6075cfd99c6b4f29eaec1d41/comment/6169a23c53401f641ba1864a#reply-6169a44018374f257327ac55)

Hi [SURAJSINGH RAJPUT](https://hashnode.com/@Robonized) glad to know you finished all the articles, very few people complete them as per the analytics I have, so thank you! Google **parquet** files - they are better than csv. Any suggestions on what our next series should be based on?

[SURAJSINGH RAJPUT](https://hashnode.com/@Robonized)

[Oct 17, 2021](https://hashnode.com/posts/cleaning-splits-and-bonus-data-using-python/6075cfd99c6b4f29eaec1d41/comment/6169a23c53401f641ba1864a#reply-616c50187c361e5132822f16)

Hey [Yash Roongta](https://hashnode.com/@yash12392) , thanks for the response, I am exploring the adjusting of prices part and it is quite a brain tickler since am so new to pandas.

If you ask me I would wanna build further on this same project and delve into Tkinter for creating a GUI where in all these 7 articles can be used in a much simpler manner. And further explore doing some charting with the EOD database that we have with us now. There are different libraries for GUI and plotting charts in Python, you can create some good content which will be a continuation of this series itself.

[Shreyans Jain](https://hashnode.com/@Shreyans)

[Jun 22, 2021](https://hashnode.com/posts/cleaning-splits-and-bonus-data-using-python/6075cfd99c6b4f29eaec1d41/comment/60d1c0604943c46b8abacee6)

What a series! It covers a lot of topics. I hope you create more amazing content.
