일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- SQL
- variables
- matplotlib
- For loops
- machine learning
- start exercise
- data distribution
- break
- multiple lines
- polynomial regression
- iterates
- Default X points
- PANDAS
- Text Analytics
- Else
- train/test
- error
- matplotlib.pyplot
- Github
- Text mining
- MySQL
- line width
- AS
- Python
- PROJECT
- self parameter
- __init__
- continue
- pie charts
- line color
- Today
- Total
목록__init__ (2)
Data Science Explorer

Python Inheritance Inheritance allows us to define a class that inherits all the methods and properties from another class. Parent class (base class) is the class being inherited. Child class(derived class) is the class that inherits from another class. Example Create a class named Christmas with month, date properties. class Christmas: def__init__(self, month, date)" self.month = month self.dat..

A class is like an object constructor, blueprint for creating objects. Example Create a class named MyClass, with a proprty named x: class MyClass: x = 10 Create Object Example Create an object named p1, and print the value of x: p1 = MyClass () print (p1.x) The __init__() Function All classes have a function called __init__(), which is always executed when the class is being initiated. Example ..