This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.links { | |
stroke: #000; | |
stroke-opacity: 0.2; | |
} | |
.polygons { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
def fixCountryNames(c): | |
return c.split('(')[0].rstrip().strip('0123456789') | |
def fixEnergyNames(energy): | |
# Rename index labels using a string processing function | |
energy.rename(index=fixCountryNames, inplace=True) | |
# Rename index labels using a dictionary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
.rectangle { | |
height: 50px; | |
width: 100px; | |
background-color: #555; | |
} |