Introduction
The first line of code I wrote in python was
print("Hello world")
This would lead me to discovering that python is used to do numerus tasks that aid people in the data field to do the following:
- create data pipelines
- design machine learning models
- create dashboard
Why do people in the data space choose python
- Python has simple syntax which reads like plain English.
- Python has powerful libraries like pandas, numpy, matplotlib and py torch which helps in data manipulation and machine learning.
- Python has a massive community that allows meaningful quick answers to be accessed by data workers.
Lets learn python
variables are a labeled box where you store a piece of information
name = "Ray"
age = 19
city = 'Nairobi'
height = 190.8
is_active = True
Python has 4 types of data types
- String name = "Ray" - Ray is the string that is stored in the variable called name.
- Integer age = 19 - 19 is the integer that is stored in the variable called age.
- Float height = 190.8 - 190.8 is the float that is stored in the variable called height.
- Bool is_active = True - True is the boolean state that is stored in the variable called is_active.
Python has 4 operators
- Comaprisson operator - compares two values and gives you true or false
age = 19
print(age > 19) ---> False
print(age == 19) ---> True
- Logic operators - includes and, or , not and - true if both conditions are true or - true if one condition is true not - turns true to false
- if, elif, else
- Nested if
Conclusion
If you are new to data, Python is the best place to begin because python
takes a short time to code and also informs you where there is a mistake.




Top comments (0)