Use pandas to upload CSV, TXT and Excel files

Story time before we begin

Learning Python isn’t the easiest thing to do. But consistency is really the key to arriving at a level that boosts your career.

We hear a lot about millennials wanting things to easy. In reality, there are a lot of young professionals who believe that they can do more for their companies but are being held back by the work cultures they are faced with at the onset of their careers.

Having been lucky enough to have found a job after my studies, I remember immediately feeling a wave of disappointment a very short while after starting my new job. I felt like a cog in a massive machine. I wasn’t really anything other than a ‘resource’. An extra 8–15 hours of daily man power depending on my boss’ whim.

The result, was the eventual disenchantment and lack of motivation simply because, for the most part, I was expected to be quiet and do my job in the hope of one day being senior enough to effect significant changes. And while the older generation would generally tell me to suck it up, I couldn’t see myself sucking it up for 5 years or more. I knew I’d get stale and afraid of change, much like those telling me to stay in my place.

For anyone in a similar situation,**_ do your best to improve on your skills _**and find an environment that works for you. That’s the whole purpose of these articles. To get you on your way to freedom.

Introduction

For this demonstration, I’ll use data from this Kaggle competition. It’s a simple CSV file containing data on individuals in the Titanic and the different profiles i.e. (age, marital status etc.)

I want to import this file to python. I’ll show you how to do this alongside all the possible troubleshoots you may encounter.

Table of Contents

  1. Where should you put your files?
  2. Reading CSV and TXT files
  3. Reading excel (XLSX) files

#python #programming #pandas #python for beginners #importing files to python with pandas #python for beginners #2 — importing files to python with pandas

Python for Beginners #2 — Importing files to python with pandas
2.60 GEEK