Calling an attribute defined in a method from another method in data science (python)

I’m learning object oriented programing in a data science context. I want to understand what good practice is in terms of writing methods within a class that relate to one another. When I run my code: I get the following output (only part of the output is shown due to space constrains): I am happy with the output generated by each method. But if I try to call print(data.quality_fun()) without first calling print(data.prepper_fun()), I get an error AttributeError: ‘MyData’ object has no attribute ‘df’. Being new to objected oriented programming, I am wondering if it is considered good practice to

I am unable to check the files available in the directory

I am trying to read the csv files in the current directory. In-order to do that, I want to check all the files present in my current directory. I have tried doing it with check_output function. However, i received this error and I’m unable to figure out how to deal with it. This is the code I have tried: this is the error i have received: Answer You can get a list of all the files in the current directory by doing this: