Pandas — Data Input & Output

Python In-built Functions For Creating, Writing & Reading Files — #PySeries#Episode 15

J3
Jungletronics
4 min readSep 18, 2020

--

DATA INPUT & OUTPUT

Working with:

Will need These

LIBRARIES:

For installations:

Let’s get it on!

CSV

Reading Writing to Files

Loading the Test File

On Colaboratory, GO TO Hamburger icon and File > Upload > ‘example.csv’ and and ‘exampl.xlsx' (download link below:), or make your own CSV file;)

Reading With Pandas:

Writing to a File:

pd.read_csv(‘My_output’)

Writing to a File without the index:

Reading again:

Excel

Reading Writing to Files

Reading to a File:

Writing to a file:

HTML

Reading Writing to Files

What does it mean when a bank fails?

A bank failure is the closing of a bank by a federal or state banking regulatory agency. Generally, a bank is closed when it is unable to meet its obligations to depositors and others

GOTO this link to see the HTML database to be uploaded:

Run:

These are a bunch of Lists:

Fetching the very first list element:

SQL

Reading Writing to Files.

Let’s create a very simple SQL Lite Engine Database running in memory:

There you have it! Thanks for reading! Bye!

Colab File link:)

Files link:)

Credits & References:

Jose Portilla — Python for Data Science and Machine Learning Bootcamp — Learn how to use NumPy, Pandas, Seaborn , Matplotlib , Plotly , Scikit-Learn , Machine Learning, Tensorflow , and more!

Posts Related:

00Episode#PySeries — Python — Jupiter Notebook Quick Start with VSCode — How to Set your Win10 Environment to use Jupiter Notebook

01Episode#PySeries — Python — Python 4 Engineers — Exercises! An overview of the Opportunities Offered by Python in Engineering!

02Episode#PySeries — Python — Geogebra Plus Linear Programming- We’ll Create a Geogebra program to help us with our linear programming

03Episode#PySeries — Python — Python 4 Engineers — More Exercises! — Another Round to Make Sure that Python is Really Amazing!

04Episode#PySeries — Python — Linear Regressions — The Basics — How to Understand Linear Regression Once and For All!

05Episode#PySeries — Python — NumPy Init & Python Review — A Crash Python Review & Initialization at NumPy lib.

06Episode#PySeries — Python — NumPy Arrays & Jupyter Notebook — Arithmetic Operations, Indexing & Slicing, and Conditional Selection w/ np arrays.

07Episode#PySeries — Python — Pandas — Intro & Series — What it is? How to use it?

08Episode#PySeries — Python — Pandas DataFrames — The primary Pandas data structure! It is a dict-like container for Series objects

09Episode#PySeries — Python — Python 4 Engineers — Even More Exercises! — More Practicing Coding Questions in Python!

10Episode#PySeries — Python — Pandas — Hierarchical Index & Cross-section — Open your Colab notebook and here are the follow-up exercises!

11Episode#PySeries — Python — Pandas — Missing Data — Let’s Continue the Python Exercises — Filling & Dropping Missing Data

12Episode#PySeries — Python — Pandas — Group By — Grouping large amounts of data and compute operations on these groups

13Episode#PySeries — Python — Pandas — Merging, Joining & Concatenations — Facilities For Easily Combining Together Series or DataFrame

14Episode#PySeries — Python — Pandas — Pandas Dataframe Examples: Column Operations

15Episode#PySeries — Python —Pandas — Data Input & Output — Python In-built Functions For Creating, Writing & Reading Files(this one)

--

--

J3
Jungletronics

😎 Gilberto Oliveira Jr | 🖥️ Computer Engineer | 🐍 Python | 🧩 C | 💎 Rails | 🤖 AI & IoT | ✍️