In my last post, I wrote about some basic functions of Pandas and DataFrames. Today, I show you how to read DataFrames from Excel. The Scenario is (again) about configuration generation, but this time I like to focus on the data gathering part.
I like to write today about a topic that I used quite frequently within the last weeks/months: pandas DataFrames. At some point in your automation story, you need some data for whatever reason. One example are connection data for some devices. Another example might be the collection of configuration information. I think you know that many people use Excel for this purpose and today, I like to show you, how you can work with DataFrames. In my next post, I show you how to read and work with data from an Excel file.
Today, I like to give you a brief introduction to a python library called invoke that is used to execute custom tasks within a shell session. Furthermore, I like to show you how invoke is used to simplify the execution of Ansible playbooks within the Product Database.
In my last post, I took a look on how to parse information from a Cisco IOS configuration using regular expressions. This post focuses on the same use case as the last one, but this time I use the ciscoconfparse library. The use of the library doesn't mean that you can ignore regular expressions at all. You need at least a basic understanding of it. Before continuing, I highly recommend to read my last post about Parse Cisco IOS configurations using RegEx. I will reuse some of the RegEx and skip the detailed explanation in this post.
In one of my earlier posts, I parse IP parameters from an existing Cisco IOS configuration using ciscoconfparse. In this post, I'll like to provide some basic patterns how to parse (almost any) information from a running configuration, but first without using any library. I just take a look at the python standard library and regular expressions (RegEx).