Path: blob/master/Python for Data Science/Day1 Python for Data Science.ipynb
3074 views
Kernel: Python 3 (ipykernel)
Dealing with unstructured and structured data, Data Science is a field that comprises of everything that related to data cleansing, preparation, and analysis.
obtaining knowledge from often enormously large data sets.
process include analysis, preparing data for analysis, and presenting results to support organisational decisions
Data Science is the combination of
statistics,
mathematics,
programming,
problem-solving,
capturing data in ingenious ways, the ability to look at things differently,
and the activity of cleansing, preparing and aligning the data.
Python For Data Science
Python is one of the most popular languages used by Data Scientists. Python has in-built mathematical libraries and functions, making it easier to calculate mathematical functions.
Data Containers in Python
Strings 2. Lists 3. Tuples 4. Dictionary
In [6]:
Out[6]:
float
Strings
In [22]:
Out[22]:
'yth'
In [23]:
Out[23]:
'a'
In [34]:
Out[34]:
bytes
In [28]:
Out[28]:
False
In [31]:
Out[31]:
Create user name for minimum 6 lenghth:wehi
Ops! User name not created invalid format
List
In [40]:
Out[40]:
[1, 2, 3, 1, 2, 3]
In [49]:
In [53]:
In [54]:
Out[54]:
['s', 'h', 'i', 'i', 'd', 'd', 'd', 'd']
In [58]:
Out[58]:
tuple
In [60]:
In [61]:
Out[61]:
['s', 'h', 'i', 'i', 'd', 'd', 'd', 'd', '3', '3']
In [64]:
Out[64]:
None
Dictionary
Mapping data types
Key value pairs
key are index to members for dictionary
Keys are unique with one value for one key
Duplicate Key creation is not possible
In [70]:
Out[70]:
{1: 'avi', 2: 'om', 3: 'Shri'}
In [73]:
Out[73]:
('avi', 'om')
In [74]:
Out[74]:
dict_keys([1, 2, 3])
In [75]:
Out[75]:
dict_values(['avi', 'om', 'Shri'])
In [76]:
In [77]:
Out[77]:
{1: 'avi', 2: 'om', 3: 'Shri', 4: 'Deb'}
In [78]:
In [79]:
Out[79]:
{1: 'vemi', 2: 'om', 3: 'Shri', 4: 'Deb'}
In [80]:
In [81]:
Out[81]:
{1: 'vemi', 2: 'om', 3: 'Shri', 4: 'Deb', 5: 'om'}
In [82]:
In [83]:
Out[83]:
{2: 'om', 3: 'Shri', 4: 'Deb', 5: 'om'}
In [85]:
Out[85]:
'A101'