Posts

Showing posts from December, 2018

Snowflake - Python connector

The Snowflake Connector for Python conforms to the Python Database API Specification 2.0 defined in  PEP 0249 . To install the latest version of the connector directly from the Python Package Index ( PyPI ): pip install snowflake-connector-python Snowflake SQLAlchemy runs on the top of Snowflake Connector for Python as a  dialect  to bridge a Snowflake database and SQLAlchemy applications. To install the latest version of the connector directly from  PyPI : pip install snowflake-sqlalchemy

Python Zip() function - Takes iterable elements as input, and returns iterator

Python zip is a container that holds real data inside. Python zip function takes iterable elements as input, and returns iterator . If Python zip function gets no iterable elements, it returns an empty iterator. if we pass two iterable object of same lengths, then an iterable of python tuple will be returned where each element of the tuple will be from those iterable lists. Python zip function is mainly used to combining data of two iterable elements together. See the following code. alphabet_list = list(string.ascii_letters) lst=zip(alphabet_list[0::2],alphabet_list[1::2]) for i in lst:     print(i) Output : ('a', 'b') ('c', 'd') ('e', 'f') ('g', 'h') ...continue