cheatSheet

Last Updated on May 29, 2023 by mishou

Work in progress.

1. Basics 1 Self-taught learning
2. Basics 2 Making your cheat sheets
3. Basics 3 Google Colaboratory
4. Basics 4 Mathematical operators
5. Basics 5 Autofill and List Comprehensions
6. Basics 6 Tables
7. Basics 7 Classes and Objects
8. Basics 8 Pivot Tables
9. Basics 9 Sample Data Sets
10. Basics 10 Flash Fill
11. Basics 11 Charts
12. Basics 12 Loops
13. Basics 13 Funcitons
14. Basics 14 Macros

I. Cheat Sheets

Create your own cheat sheets. They will tell you what you should learn by heart. You can create beautiful cheat sheets using Keynote, PowerPoint or something like that. Let me show you my cheat sheets though they are not completed yet.

II. How to use ( ), [ ], and { }

Certainly, parentheses, square brackets, and braces are very confusing for beginners but it makes you feel at ease to know the following general usage of them when you understand and memorize snippets.

brackets, braces, parentheses in a data frame

1.Square brackets [ ]

  • Creating lists
  • Requesting items

2.Curly braces { }

  • Creating dictionaries
  • Creating sets
  • f-strings

3.Parentheses ( )

  • Callables (functions and classes)
  • Creating tuples
  • Cheating Python’s indentation rules

In the Cheat sheets I have shown some scripts similar to R scripts with pipes using ( ):

df0 = pd.read_csv("https://pastebin.com/raw/cSZ8pYWh")
(df0.  # about df0
 filter(['english', 'japanese']). # select columns
 mean(). # get the means
 to_frame(name = 'average') # 
)

You can learn more here:

A Quick Introduction to the Python Pandas Package

Python parentheses primer

By mishou

Leave a Reply

Your email address will not be published. Required fields are marked *