Python concepts for BigData
Python concept for BigData
Important concepts of Python
- Ganeral purpose programming language:
- Web development
- Enterprices related development - video streaming or storing data
- Testing
- CAD & Embedded applications
- Games Development
- Desktop based application (GUI)
- Artificial Intelligence
- Data Analytics
- Data Science
- Machine Learning
- Big Data analytics
- Softwares or tools for python: python.org for downloading tools and software(official website)
- Command line interface and integrated development environment will also come with python package at the time of installing software
- cmd is for practice and ide for software or application creation.
- Another distributor of python is anaconda.
- It is a company which provide additional packages and functionality for python.
- Jupitor - Notebook and support multiple languages for practice. It supports 40+ languages as it has 40+ kernels support. Jupitor come with python pre-install and for other languages we need to install them exclusively.
- Make sharing notebook easy, interactive output and support bigdata.
- Jupitor Hub:
- Pluggable authentication, Centralized deployment, Container friendly, Code meets data
- It is used for practice.
- Anaconda Navigator - to locate packages or package store for downloading it.
- Anaconda Powershell prompt/Anaconda prompt - cmd/cli for practice
- Spyder - IDE for software development
Python Console and commands:
In Python console you will see the python version as I have 3.11.9 and date of release.
In Python you have to use help() -> funciton to open help interactive console.
Below you can see it as example:
As you can see in screenshot we have three more facilities like copyright, credits and license so you can see them or can check them as well by typing them as function by putting () in end.
Python is case sensitive language.
All keywords must be used with right and appropriate case.
Under help menu you can check information for keywords, modules, symbols and topics.
Below are sample of it:
Python 3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> help
Type help() for interactive help, or help(object) for help about object.
>>> help()
Welcome to Python 3.11's help utility! If this is your first time using
Python, you should definitely check out the tutorial at
https://docs.python.org/3.11/tutorial/.
Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules. To get a list of available
modules, keywords, symbols, or topics, enter "modules", "keywords",
"symbols", or "topics".
Each module also comes with a one-line summary of what it does; to list
the modules whose name or summary contain a given string such as "spam",
enter "modules spam".
To quit this help utility and return to the interpreter,
enter "q" or "quit".
help> q
You are now leaving help and returning to the Python interpreter.
If you want to ask for help on a particular object directly from the
interpreter, you can type "help(object)". Executing "help('string')"
has the same effect as typing a particular string at the help> prompt.
>>> copyright()
Copyright (c) 2001-2023 Python Software Foundation.
All Rights Reserved.
Copyright (c) 2000 BeOpen.com.
All Rights Reserved.
Copyright (c) 1995-2001 Corporation for National Research Initiatives.
All Rights Reserved.
Copyright (c) 1991-1995 Stichting Mathematisch Centrum, Amsterdam.
All Rights Reserved.
>>> help
Type help() for interactive help, or help(object) for help about object.
>>> help()
Welcome to Python 3.11's help utility! If this is your first time using
Python, you should definitely check out the tutorial at
https://docs.python.org/3.11/tutorial/.
Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules. To get a list of available
modules, keywords, symbols, or topics, enter "modules", "keywords",
"symbols", or "topics".
Each module also comes with a one-line summary of what it does; to list
the modules whose name or summary contain a given string such as "spam",
enter "modules spam".
To quit this help utility and return to the interpreter,
enter "q" or "quit".
help> keywords
Here is a list of the Python keywords. Enter any keyword to get more help.
False class from or
None continue global pass
True def if raise
and del import return
as elif in try
assert else is while
async except lambda with
await finally nonlocal yield
break for not
help> del
The "del" statement
*******************
del_stmt ::= "del" target_list
Deletion is recursively defined very similar to the way assignment is
defined. Rather than spelling it out in full details, here are some
hints.
Deletion of a target list recursively deletes each target, from left
to right.
Deletion of a name removes the binding of that name from the local or
global namespace, depending on whether the name occurs in a "global"
statement in the same code block. If the name is unbound, a
"NameError" exception will be raised.
Deletion of attribute references, subscriptions and slicings is passed
to the primary object involved; deletion of a slicing is in general
equivalent to assignment of an empty slice of the right type (but even
this is determined by the sliced object).
Changed in version 3.2: Previously it was illegal to delete a name
from the local namespace if it occurs as a free variable in a nested
block.
Related help topics: BASICMETHODS
help> symbols
Here is a list of the punctuation symbols which Python assigns special meaning
to. Enter any symbol to get more help.
!= + <= __
" += <> `
""" , == b"
% - > b'
%= -= >= f"
& . >> f'
&= ... >>= j
' / @ r"
''' // J r'
( //= [ u"
) /= \ u'
* : ] |
** < ^ |=
**= << ^= ~
*= <<= _
help> modules
Please wait a moment while I gather a list of all available modules...
C:\Users\punee\AppData\Local\Programs\Python\Python311\Lib\site-packages\_distutils_hack\__init__.py:18: UserWarning: Distutils was imported before Setuptools, but importing Setuptools also replaces the `distutils` module in `sys.modules`. This may lead to undesirable behaviors or errors. To avoid these issues, avoid using distutils directly, ensure that setuptools is installed in the traditional way (e.g. not an editable install), and/or make sure that setuptools is always imported before distutils.
warnings.warn(
C:\Users\punee\AppData\Local\Programs\Python\Python311\Lib\site-packages\_distutils_hack\__init__.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
test_sqlite3: testing with version '2.6.0', sqlite_version '3.45.1'
__future__ _threading_local getpass sched
__hello__ _tkinter gettext secrets
__phello__ _tokenize glob select
_abc _tracemalloc graphlib selectors
_aix_support _typing gzip setuptools
_ast _uuid hashlib shelve
_asyncio _warnings heapq shlex
_bisect _weakref hmac shutil
_blake2 _weakrefset html signal
_bootsubprocess _winapi http site
_bz2 _xxsubinterpreters idlelib smtpd
_codecs _zoneinfo imaplib smtplib
_codecs_cn abc imghdr sndhdr
_codecs_hk aifc imp socket
_codecs_iso2022 antigravity importlib socketserver
_codecs_jp argparse inspect sqlite3
_codecs_kr array io sre_compile
_codecs_tw ast ipaddress sre_constants
_collections asynchat itertools sre_parse
_collections_abc asyncio json ssl
_compat_pickle asyncore keyword stat
_compression atexit lib2to3 statistics
_contextvars audioop linecache string
_csv base64 locale stringprep
_ctypes bdb logging struct
_ctypes_test binascii lzma subprocess
_datetime bisect mailbox sunau
_decimal builtins mailcap symtable
_distutils_hack bz2 marshal sys
_elementtree cProfile math sysconfig
_functools calendar mimetypes tabnanny
_hashlib cgi mmap tarfile
_heapq cgitb modulefinder telnetlib
_imp chunk msilib tempfile
_io cmath msvcrt test
_json cmd multiprocessing textwrap
_locale code netrc this
_lsprof codecs nntplib threading
_lzma codeop nt time
_markupbase collections ntpath timeit
_md5 colorsys nturl2path tkinter
_msi compileall numbers token
_multibytecodec concurrent opcode tokenize
_multiprocessing configparser operator tomllib
_opcode contextlib optparse trace
_operator contextvars os traceback
_osx_support copy pathlib tracemalloc
_overlapped copyreg pdb tty
_pickle crypt pickle turtle
_py_abc csv pickletools turtledemo
_pydecimal ctypes pip types
_pyio curses pipes typing
_queue dataclasses pkg_resources unicodedata
_random datetime pkgutil unittest
_sha1 dbm platform urllib
_sha256 decimal platformdirs uu
_sha3 difflib plistlib uuid
_sha512 dis poplib venv
_signal distlib posixpath virtualenv
_sitebuiltins distutils pprint warnings
_socket doctest profile wave
_sqlite3 email pstats weakref
_sre encodings pty webbrowser
_ssl ensurepip py4j winreg
_stat enum py_compile winsound
_statistics errno pyclbr wsgiref
_string faulthandler pydoc xdrlib
_strptime filecmp pydoc_data xml
_struct fileinput pyexpat xmlrpc
_symtable filelock pyspark xxsubtype
_testbuffer fnmatch queue zipapp
_testcapi fractions quopri zipfile
_testconsole ftplib random zipimport
_testimportmultiple functools re zlib
_testinternalcapi gc reprlib zoneinfo
_testmultiphase genericpath rlcompleter
_thread getopt runpy
Enter any module name to get more help. Or, type "modules spam" to search
for modules whose name or summary contain the string "spam".
help> topics
Here is a list of available topics. Enter any topic name to get more help.
ASSERTION DELETION LOOPING SHIFTING
ASSIGNMENT DICTIONARIES MAPPINGMETHODS SLICINGS
ATTRIBUTEMETHODS DICTIONARYLITERALS MAPPINGS SPECIALATTRIBUTES
ATTRIBUTES DYNAMICFEATURES METHODS SPECIALIDENTIFIERS
AUGMENTEDASSIGNMENT ELLIPSIS MODULES SPECIALMETHODS
BASICMETHODS EXCEPTIONS NAMESPACES STRINGMETHODS
BINARY EXECUTION NONE STRINGS
BITWISE EXPRESSIONS NUMBERMETHODS SUBSCRIPTS
BOOLEAN FLOAT NUMBERS TRACEBACKS
CALLABLEMETHODS FORMATTING OBJECTS TRUTHVALUE
CALLS FRAMEOBJECTS OPERATORS TUPLELITERALS
CLASSES FRAMES PACKAGES TUPLES
CODEOBJECTS FUNCTIONS POWER TYPEOBJECTS
COMPARISON IDENTIFIERS PRECEDENCE TYPES
COMPLEX IMPORTING PRIVATENAMES UNARY
CONDITIONAL INTEGER RETURNING UNICODE
CONTEXTMANAGERS LISTLITERALS SCOPING
CONVERSIONS LISTS SEQUENCEMETHODS
DEBUGGING LITERALS SEQUENCES
help>
Commands practice in Python:
- Methods are used by specific objects and are defined by python language itself.
- Function is created by user and they are user defined.
- Class Methods which are starting with __ or _ and ending with __ or _. It provide already stored values or methods which are created in python during class creation or package lib creation for datatype variable and can be used by specific variable.
- eg: __add__, __class__, __reverse__ etc.
- How to use it: ages.__len__() -> It will provide count of elements present in a list.

Comments
Post a Comment