Pular para o conteúdo principal
InicioFolhas de consultaData Science

Markdown Cheat Sheet

Learn everything you need to know about Markdown in this convenient cheat sheet!
20 de out. de 2023

Have this cheat sheet at your fingertips

Download PDF

Formatting Text Spans

Surround text with a single asterisk or underscore for emphasis (italics)

she thought in *italics*

she thought in _italics_

she thought in italics

Surround text with double asterisks or underscores to make it bold

to **boldly** go

to __boldly__ go

to boldly go

Boldness and emphasis can be nested for bold-italic text

**Boldness has *genius*, _power_, and *magic*** in it

Boldness has genius, power, and magic in it

Surround text with one of more backticks to make it code

Should I use `pandas` or `dplyr`?

Should I use pandas or dplyr?

Surround text with one of more tildes to strike it through

Every strike brings me ~closer to~ the next home run

Every strike brings me closer to the next home run

Surround text with a single dollar sign to make it a LaTeX equation

$e^{\pi i} + 1 = 0$

Formatting Text Blocks

Start a line with greater than then space to make it a quote

> Without data you're just

> another person with an opinion

Without data you're just another person with an opinion

Surround a block of text with lines starting with three backticks to make it a code block

```

x = (1 + sqrt(5)) / 2

```

x = (1 + sqrt(5)) / 2

Optionally specify the language of the code after the backticks to highlight syntax

``` python

x = (1 + sqrt(5)) / 2

```

x = (1 + sqrt(5)) / 2

Lists

Start lines with hyphens, plus or asterisks then a space to make an unordered list

(Be consistent about which punctuation is used)

- bread

- milk

- eggs

- teabags

  • bread
  • milk
  • eggs
  • teabags

Start lines with a number followed by a period then a space to make an ordered list.

(Numbering is automatic and follows from the first element.)

3. three

1. four

1. five

1. six

  1. three
  2. four
  3. five
  4. six

Inside a list, include square brackets filled with a space or character (conventionally 'x') to create a checklist

- [x] bread

- [ ] milk

- [x] eggs

- [ ] teabags

 

Use space indentation to nest lists

* The Lord of the Rings

1. The Fellowship of the Ring

1. The Ring Sets Out

1. The Ring Goes South

1. The Two Towers

1. The Treason of Isengard

1. The Ring Goes East

1. The Return of the King

1. The War of the Ring

1. The End of the Third Age

  • The Lord of the Rings
  1. The Fellowship of the Ring
    1. The Ring Sets Out
    2. The Ring Goes South
  2. The Two Towers
    1. The Treason of Isengard
    2. The Ring Goes East
  3. The Return of the King
    1. The War of the Ring
    2. The End of the Third Age

Headings

Start a line with one to six hashes then a space to make it a heading

# Constitution of the United States

## Articles

### Article I: The Legislative Branch

#### Section 1: The Legislature

Constitution of the United States

Articles

Article I: The Legislative Branch

Section 1: The Legislature

For level one headings, you can also follow the line with a line of equals signs

Constitution of the United States

=================================

Constitution of the United States

For level two headings, you can also follow the line with a line of hyphens

Articles

--------

Articles

Links, Images and Footnotes

Use square brackets containing link text followed by parentheses containing a URL to include a hyperlink

[Build data and AI skills with DataCamp](https://www.datacamp.com)

Build data and AI skills with DataCamp

Use square brackets containing link text followed by a reference number, then (usually at the bottom of the doc) square brackets containing the reference number followed by a colon then a space then a URL to include reference-style hyperlinks.

[Listen to DataFramed][1]

[1]: https://www.datacamp.com/podcast

Listen to DataFramed

Use an exclamation mark followed by square brackets containing alt text followed by parentheses containing a URL or path to a file to include an image

![The Markdown logo](Markdown-mark.png)

The Markdown logo

Use square brackets containing a caret then a number (both within the content and at the foot of the page) to create a footnote.

Literature is the original Internet – every footnote, every citation, every allusion is essentially a hyperlink to another text, to another mind.[^1]

[^1]: Attributed to Maria Popova

Tables

Use pipes to delimit columns in a table. Use hyphens to separate the header from the content. Use a colon to the left or right of those hyphens to indicate column alignment.

| Sepal Length| Sepal Width| Petal Length| Petal Width|      Species |

|-----------------:|----------------:|-----------------:|---------------:|:---------------|

|                 5.1|                3.3|                  1.7|              0.5|        setosa |

|                4.8|                3.0|                  1.4|              0.1|        setosa |

|                 6.1|                2.8|                 4.7|               1.2|   versicolor |

|                 6.1|                3.0|                 4.6|               1.4|  versicolor |

Sepal Length

Sepal Width

Petal Length

Petal Width

Species

5.1

3.3

1.7

0.5

setosa

4.8

3.0

1.4

0.1

setosa

6.1

2.8

4.7

1.2

versicolor

6.1

3.0

4.6

1.4

versicolor

Breaks

Have a line with only three or more hyphens, asterisks, or underscores (plus optional spaces) to include a horizontal rule.

---

***

___

By default, text on consecutive lines flows as a single line.

Writing one line,

then another without a break,

results in text flowing as a single line.

Writing one line, then another without a break, results in text flowing as a single line.

Two spaces at the end of a line result in a line break.

Appending two spaces to the end of the line¶¶

creates a line break.

Appending two spaces to the end of the line

creates a line break.

Blank lines create a new paragraph.

Including a blank line in between two lines of text

creates a paragraph break.

Including a blank line in between two lines of text

creates a paragraph break.

Temas
Relacionado

cheat-sheet

LaTeX Cheat Sheet

Learn everything you need to know about LaTeX in this convenient cheat sheet!
Richie Cotton's photo

Richie Cotton

cheat-sheet

Python for Data Science - A Cheat Sheet for Beginners

This handy one-page reference presents the Python basics that you need to do data science
Karlijn Willems's photo

Karlijn Willems

4 min

cheat-sheet

Docker for Data Science Cheat Sheet

In this cheat sheet, learn how to apply Docker in your Data Science projects
Richie Cotton's photo

Richie Cotton

5 min

cheat-sheet

Python For Data Science Cheat Sheet For Beginners

This cheat sheet covers the basics that you need to know to do data science with Python
Karlijn Willems's photo

Karlijn Willems

1 min

cheat-sheet

Deep Learning with PyTorch Cheat Sheet

Learn everything you need to know about PyTorch in this convenient cheat sheet
Richie Cotton's photo

Richie Cotton

6 min

tutorial

Python For Data Science - A Cheat Sheet For Beginners

This handy one-page reference presents the Python basics that you need to do data science
Karlijn Willems's photo

Karlijn Willems

7 min

See MoreSee More