Linux Format

PANDAS AND DATA

-

Pandas can perform a variety of tasks including data loading, preparatio­n and manipulati­on as well as data modelling and analysis. You can join, merge and reshape data with the help of Pandas, using data from different sources.

As mentioned elsewhere in this tutorial, everything begins with a structure and the data you add to that structure. The two data structures supported by Pandas are data frames (pandas.DataFrame) and series (pandas. Series). You usually put data in these two data structures by reading it from a file. Apart from reading data from CSV files, Pandas can handle a wide range of data formats including HTML, JSON, Microsoft Excel, SPSS, SAS and Google BigQuery. Additional­ly, Pandas can save data into various formats including CSV, JSON, HTML, SQL and Microsoft Excel.

Even though Pandas has data processing and basic visualisat­ion capabiliti­es, it can’t compete with specialise­d packages such as NumPy, SciPy and Matplotlib.

Generally speaking, knowing how to convert between different data types is handy when working with data. You can convert a Pandas DataFrame into a numpy.ndarray object using the to_ numpy() Pandas function. Additional­ly, you can convert a numpy.ndarray object into a Pandas DataFrame as follows: pd.DataFrame(data = nd_array_variable) .

All previous statements can be found in convert.py. Remember that mastering conversion­s is the key to mastering Pandas and data manipulati­on!

Newspapers in English

Newspapers from Australia