Python

Python struct pack, unpack — step-by-step Python tutorial on Progressive Robot

Python struct pack, unpack

URL: https://www.progressiverobot.com/python-struct-pack-unpack/ Python struct [module](/community/tutorials/python-modules) is capable of performing the conversions between the Python values and C structs, which are represented as [Python Strings](/community/tutorials/python-string). Python Struct Python struct module can be used in handling binary data stored in files, database or from network connections etc. It uses format Strings as compact descriptions of the layout […]

Read more
How to calculate BLEU Score in Python? — step-by-step Python tutorial on Progressive Robot

How to calculate BLEU Score in Python?

Bleu score in Python is a metric that measures the goodness of Machine Translation models. Though originally it was designed for only translation models, now it is used for other [natural language processing applications](/community/tutorials/natural-language-processing-tasks) as well. The BLEU score compares a sentence against one or more reference sentences and tells how well does the candidate […]

Read more
Python Pandas Module Tutorial — step-by-step Python tutorial on Progressive Robot

Python Pandas Module Tutorial

URL: https://www.progressiverobot.com/python-pandas-module-tutorial/ Python Pandas Module Pandas is an open source library in Python. It provides ready to use high-performance data structures and data analysis tools. Pandas module runs on top of [NumPy](/community/tutorials/python-numpy-tutorial) and it is popularly used for data science and data analytics. NumPy is a low-level data structure that supports multi-dimensional arrays and a […]

Read more
Pandas to_csv() - Convert DataFrame to CSV — step-by-step Python tutorial on Progressive Robot

Pandas to_csv() – Convert DataFrame to CSV

URL: https://www.progressiverobot.com/pandas-to-csv-convert-dataframe-to-csv/ Pandas DataFrame to_csv() function converts DataFrame into CSV data. We can pass a file object to write the CSV data into a file. Otherwise, the CSV data is returned in the string format. Pandas DataFrame to_csv() Syntax The syntax of DataFrame to_csv() function is: def to_csv( self, path_or_buf=None, sep=",", na_rep="", float_format=None, columns=None, header=True, […]

Read more
Python main function — step-by-step Python tutorial on Progressive Robot

Python main function

URL: https://www.progressiverobot.com/python-main-function/ Python main function is executed only when it's being executed as a python program. As you know, we can also [import](/community/tutorials/python-input-output-python-import) a python program as a module, in that case python main method should not execute. Python main function Main function is the entry point of any program. But python interpreter executes the […]

Read more
CHAT