> For the complete documentation index, see [llms.txt](https://george-jen.gitbook.io/data-science-with-apach-spark/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://george-jen.gitbook.io/data-science-with-apach-spark/untitled-42.md).

# index

Besides list, tuple, string, dictionary, set are data structure, you can define class that has attributes

For example

class car(object):

```
wheel\_number=4

seal\_row\_number=2

def \_\_init\_\_\(self,brand\):

    self.brand=brand
```

wheel\_number, seal\_row\_number are class attributes, class attributes can be of any data type, include

list, tuple, string, dictionary and set

You notice class can also have methods, \_\_init\_\_ is called constructor method, it runs when instantiating a class, for example

small\_car=car("toyota")

small\_car.brand

'toyota’

small\_car.seal\_row\_number

2
