Part 2: CSV to PDF

Story: This series of articles assume you are an employee of the City of Sacramento’s IT Department. At the end of each month, a CSV file is sent to the Chief of Police outlining the crime statistics for the current month. However, the Chief prefers to view the output in a styled PDF format based … Read more

Serialize DataFrame to_gbq() and to_coo()

This article focuses on the serialization and conversion methods of a Python DataFrame: to_gbq(), to_coo(). Let’s get started! Preparation Before any data manipulation can occur, four (4) new libraries will require installation. The Pandas library enables access to/from a DataFrame. The NumPy library supports multi-dimensional arrays and matrices in addition to a collection of mathematical … Read more

Serialize DataFrame to Parquet, Feather, String, Styler

This article focuses on the serialization and conversion methods of a Python DataFrame: to_parquet(), to_feather(), to_string(), Styler. Let’s get started! Preparation Before any data manipulation can occur, three (3) new libraries will require installation. The Pandas library enables access to/from a DataFrame. The Pyarrow library allows writing/reading access to/from a parquet file. The Openpyxl library … Read more

Serialize DataFrame to Markdown, Strata, HDF, LaTex, XML

This article focuses on the serialization and conversion methods of a Python DataFrame: to_markdown(), to_stata(), to_hdf(), to_latex(), to_xml(). Let’s get started! Preparation Before any data manipulation can occur, four (4) new libraries will require installation. The Pandas library enables access to/from a DataFrame. The Tabulate library enables formatted output. The Tables library allows formatted output … Read more

Serialize DataFrame to Clipboard, HTML, SQL, CSV, Excel

This article focuses on the serialization and conversion methods of a Python DataFrame: to_clipboard(), to_html(), to_sql(), to_csv(), and to_excel() Let’s get started! Preparation Before any data manipulation can occur, two (2) new libraries will require installation. The Pandas library enables access to/from a DataFrame. The Openpyxl library enables conversion to/from Excel. To install these libraries, … Read more

Serialize DataFrame – Dict, Records, JSON, and Pickles

This article focuses on the serialization and conversion methods of a Python DataFrame: from_dict(), to_dict(), from_records(), to_records(), to_json(), and to_pickles(). Let’s get started! Preparation Before any data manipulation can occur, two (2) new libraries will require installation. The Pandas library enables access to/from a DataFrame. The NumPy library supports multi-dimensional arrays and matrices in addition … Read more

Pandas Hexbin, Hist, Pie, Scatter Plot

The Pandas DataFrame/Series has several methods related to plotting. Preparation Before any data manipulation can occur, four (4) new libraries will require installation. The Pandas library enables access to/from a DataFrame. The NumPy library supports multi-dimensional arrays and matrices in addition to a collection of mathematical functions. The Matplotlib library displays a visual graph of … Read more

Pandas Plotting – plot() & plot.area()

The Pandas DataFrame/Series has several methods related to plotting. Preparation Before any data manipulation can occur, three (3) new libraries will require installation. The Pandas library enables access to/from a DataFrame. The Matplotlib library displays a visual graph of a plotted dataset. The Scipy library allows users to manipulate and visualize the data. To install … Read more

Pandas resample(), to_period(), to_timestamp(), tz_localize(), tz_convert()

The Pandas DataFrame/Series has several methods related to time series. Preparation Before any data manipulation can occur, one (1) new library will require installation. The Pandas library enables access to/from a DataFrame. To install this library, navigate to an IDE terminal. At the command prompt ($), execute the code below. For the terminal used in … Read more