Python is emerging as one of the favorite tools in the filed of data science. With powerful data science libraries like NumPy, SciPy, pandas, matplotlib, scikit-learn and tools like IPython (Jupyter) notebook combined with ease of programming, Python is proven as the powerful and preferred language of organizations. In this course I will tech you the basics of NumPy and further take a deep dig on playing with NumPy. NumPy : NumPy is a python library, which supports efficient handling of various numerical operations on arrays holding numeric data. They are known as N-dimensional-arrays or ndarrays. Ndarrays are capable of holding data elements in multiple dimensions and each data element of it is of fixed size and also all the elements of ndarray are of same data type. N-dimensional array ( ndarray) : N-dimensional array is an object, capable of holding data elements of same type and of fixed size in multiple dimensions. 1-D Array Example
File handling is the most important part of any Web Applications. This has several functions for creating, reading, updating, deleting files etc., File Handling: The key for working with files in Python is the open() function. Syntax: open(filename, mode) There are four different methods for opening a file: "r" - Read - Default value. Opens a file for reading, error if the file does not exist. "a" - Append - Opens a file for appending, creates the file if it does not exist. "w" - Write - Opens a file for writing, creates the file if it does not exist. "x" - Create - Creates the specified file, returns an error if the file exists. In addition you can specify if the file should be handled as binary or text mode: "t" - Text - Default value. Text mode. "b" - Binary - Binary mode(e.g., images) Note: Make sure the file exists, or else you will get an error. Syntax: f =