People Analytics Python Training String
People Analytics Python Training String
—
People analytics
Python Training
—
Data Science - Learning Roadmap
Sept to Dec 19
Text Analytics/NLP
Fuzzy logic
Intelligent Automation
—
Table Contents
2/21/21 Slide 4
—
Table Contents
Pandas-2 - DAY5
Numpy-1 -- DAY6
2/21/21
—
Introduction to Python
Named the language after the BBC show “Monty Python Flying Circus”.
IDLE: A cross platform python development environment
2/21/21 Slide 6
PythonWin: A Windows only interface to python
Shell: Running Python from command
—
Installation & Running Python
1) Download Miniconda ‘.exe’ file for Python 3.7 version of windows from given link :
https://docs.conda.io/en/latest/miniconda.html
2) Double click on installer file to start installation
i. Click Next, I agree in further steps…….
ii. When you reach the screen with the Install button, verify the the two Advanced Options checkboxes to Add
Anaconda to my PATH environment variable and to Register Anaconda as my default Python 3.5 are both
checked. Then click Install.
iii. When the install finishes, click Next then Finish.
Interpreted Language
• Interpreter Vs compiler
Object Oriented language
Dynamically Typed
Supports tab completion by default
Support for Macros( Ex: microprocessor)
Indentation Specifies scope
Leads to easier to read code
Memory Allocation
Python code is quick but running it is often slower than compiled languages?
2/21/21 Slide 10
—
Int
Float
String
Complex
Boolean
Long(Python 2)
Type conversion :
• Int : int(a,base)
• Float: float()
• String: str()
• Character to integer: ord()
Mutable vs Immutable:
• Mutable : List, set, Dict
• Immutable: Bool, int, float, tuple, str
Mutable values can change after creation where as for immutable can ‘t.
2/21/21 Slide 12
https://learnpythonforcbse.wordpress.com/2018/07/14/python-data-types-and-operators/.
—
Continued…
2/21/21 Slide 13
—
Continued…
What are the possible ways to specify string literal foo’bar in python?
2/21/21 Slide 15
—
Strings
Word.split()
Word.strip()
X, Y = ‘Hello’ , ‘World’
Word[1:4]
Formatting : ( New Line: \n , Tab space: \t, backslash: \\)
Word.find(‘ll’)
Word.replace(‘e’,’m’)
Reverse string: Word[::-1]
Word After one character: Word[1::]
String Concatenation : Word_concate = ‘Hello’+ ‘ ‘ + ‘World’
String split: String_variable= ‘Hello Google tell me something’
• String_variable.split(‘ ‘ )
String Deletion : del Word
2/21/21 Slide 17
—
2/21/21 Slide 18
2/21/21 Slide 19