A to Z Basics of Python - fast track to get started


Built a simple game using Pygame & applied NEAT (NeuroEvolution of Augmenting Topologies) algorithm to train AI.

Encoding continuous and categorical values as dummies.

Photo by Iñigo De la Maza on Unsplash

Categorical and Continuous Values

Neural networks require their input to be a fixed number of columns. This input format is very similar to spreadsheet data. This input must be entirely numeric.

  • Ordinal — Individual distinct items have an implied…

Apply and Map function on a pandas dataframe

Photo by Michał Mancewicz on Unsplash

Apply and Map

Map and reduce are two functions that apply a task that you create to a data frame. Pandas supports functional programming techniques that allow you to use functions across en entire data frame. Pandas also provides several standard functions for use with data frames.

Using Map with Dataframes

The map function allows you to transform a column by mapping certain values in that column to other values. Consider the Auto MPG data set that contains a field origin_name that holds a value between one and three that indicates the geographic origin of each car. …

Pandas functions like Reset-Index, sort, group and shuffle explained with examples.

Photo by Duy Pham on Unsplash

Shuffling a Dataset

There may be information lurking in the order of the rows of your dataset. Unless you are dealing with time-series data, the order of the rows should not be significant. Consider if your training set included employees in a company. Perhaps this dataset is ordered by the number of years that the employees were with the company. It is okay to have an individual column that specifies years of service. However, having the data in this order might be problematic.

Intro to Pandas, reading files handling Missing values

Photo by Pascal Müller on Unsplash

Examples on Functions, Lambda and Map/Reduce

Photo by Ian Keefe on Unsplash

Reading csv, text and image files

Photo by Ohmky on Unsplash
  • Image files (generally with the .png or .jpg extension) hold images for computer vision.
  • Text files (often have the .txt extension) hold unstructured text and are essential for natural language processing.
  • JSON (often have the .json extension) contain semi-structured textual data in a human-readable text-based format.
  • H5 (can have a wide array of extensions) contain semi-structured textual data in a human-readable text-based format. …

List, Dictionary, Set and Tuple

Photo by Rene Böhmer on Unsplash
  • List — A list is a mutable ordered collection that allows duplicate elements.
  • Set — A set is a mutable unordered collection with no duplicate elements.
  • Tuple — A tuple is an immutable ordered collection that allows duplicate elements.

Lists and Tuples

Lists and tuples are very similar in Python and are often confused. The significant difference is that a list is mutable, but a tuple isn’t. …

  • software development.
  • Machine Learning.
  • Deep Learning etc.


Certified Data Science Associate, Machine Learning and AI Practitioner Github:-https://github.com/Msanjayds, Linked in: https://www.linkedin.com/in/sanjaymds/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store