Reorganizing and reshaping data
When working with financial information, it is often the case that data retrieved from almost any data source will not be in the format that you need to perform the analyses that you want.
Or perhaps, just as likely, the data from a specific source may be incomplete and require collection of data from another source, at which point, the data needs to be either concatenated or merged through join-like operations across the data.
Even if the data is complete or after combining it from various sources, it may still be organized in a manner that is not conducive to a specific type of analysis. Hence, it needs to be restructured.
Fortunately, pandas provides rich capabilities for concatenating, merging, and pivoting data. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access