Skip to content

Instantly share code, notes, and snippets.

@GabrielCzar
Last active May 27, 2018 00:34
Show Gist options
  • Select an option

  • Save GabrielCzar/5f801eb8b117bba657316d076dc2f692 to your computer and use it in GitHub Desktop.

Select an option

Save GabrielCzar/5f801eb8b117bba657316d076dc2f692 to your computer and use it in GitHub Desktop.

Revisions

  1. GabrielCzar revised this gist May 27, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions new-columns.md
    Original file line number Diff line number Diff line change
    @@ -2,8 +2,8 @@

    | id| Location |
    |---|--------------------------------|
    | 0 | UK~London~East London~Mile End |
    | 1 | UK~London~East London~Shadwe |
    | 0 | UK ~ London~East London ~ Mile End |
    | 1 | UK ~ London~East London ~ Shadwe |

    - Comando:
    ```py
  2. GabrielCzar revised this gist May 27, 2018. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions new-columns.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    - Entrada

    | id| Location |
    |---|--------------------------------|
    | 0 | UK~London~East London~Mile End |
    @@ -9,6 +10,7 @@
    XlocTree = pd.DataFrame(df_location_tree.rel.str.split('~', 3).tolist(), columns = ['ABBR','City','Region', 'Local'])
    ```
    - Saida

    | id| ABBR | City | Region | Local |
    |---|------|------|-------------|----------|
    | 0 | UK | London | East London | Mile End |
  3. GabrielCzar revised this gist May 27, 2018. 1 changed file with 8 additions and 1 deletion.
    9 changes: 8 additions & 1 deletion new-columns.md
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,15 @@
    - Entrada
    | id| Location |
    |---|--------------------------------|
    | 0 | UK~London~East London~Mile End |
    | 1 | UK~London~East London~Shadwe |

    - Comando:
    ```py
    XlocTree = pd.DataFrame(df_location_tree.rel.str.split('~', 3).tolist(), columns = ['ABBR','City','Region', 'Local'])
    ```
    ```
    - Saida
    | id| ABBR | City | Region | Local |
    |---|------|------|-------------|----------|
    | 0 | UK | London | East London | Mile End |
    | 1 | UK | London | East London | Shadwe |
  4. GabrielCzar created this gist May 27, 2018.
    8 changes: 8 additions & 0 deletions new-columns.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    | id| Location |
    |---|--------------------------------|
    | 0 | UK~London~East London~Mile End |
    | 1 | UK~London~East London~Shadwe |

    ```py
    XlocTree = pd.DataFrame(df_location_tree.rel.str.split('~', 3).tolist(), columns = ['ABBR','City','Region', 'Local'])
    ```