00:01
In this question, what we have to do is we have to format a 2d data in a python language and we have not to use any python modules for that.
00:11
So 2d data will be like this, for example, so we have to format them like this.
00:44
Let's just column one, column two and column three and we have to write like this.
00:51
So for this type of data, our output should look like this.
01:08
So we are in google collab.
01:13
And first we will create a function.
01:15
Let's say format tabular data x and we will pass data as a parameter.
01:27
So let's first see what is our input look like.
01:37
So this is our 2d list x1.
01:45
This is our 2d list.
01:48
This is the outer list and the smaller list inside this outer list are the rows and the value inside this smaller list are the columns.
01:57
Okay, so let's find the maximum number of columns in it.
02:11
We will take the max of length of row in that outer list.
02:22
So max of length of row for row in data.
02:35
Then we will create an empty list.
02:41
This is our final formatted data.
02:47
Then we will create a for loop to read this x1.
02:59
So what we will do is we will pass the x1 as our input to this data...