I am extremely new to python and want to learn how to pull certain elements from a data sheet. For example:
- How many attributes/categories the data has?
- How many missing values the data has?
- How many columns the data has?
- The frequency of an element in a single column
I have gotten as far as printing the data but am wondering how I can compute the above values via while loops or for loops
file=open('9car.csv','r')
M=[]
lines=file.readlines()
for row in lines:
value=row.strip()
items=value.split()
# print(items)
print(value)
# print(values)
for row in M:
count=len(row)
print(count)