1 + 2
515430 + 1545135
3 * 4
15461354688 * 15644187414
a = "Victor"
b = " es"
c = " Gay"
d = " Rey"
e = " Tu"
print(f"{a}{b}{e}{d}")
Victor es Tu Rey
print(f"{a}{b}{c}")
Victor es Gay
mi_primera_variable = "tiene un contenido muy extenso"
mi_segunda_variable = "es muy interesante"
print(f"¡Este curso {mi_primera_variable} y {mi_segunda_variable}!")
¡Este curso tiene un contenido muy extenso y es muy interesante!
Execution error
NameError: name 'cars' is not defined
pip install vega-datasets session-info
Collecting vega-datasets
Downloading vega_datasets-0.9.0-py3-none-any.whl (210 kB)
|████████████████████████████████| 210 kB 14.6 MB/s
Collecting session-info
Downloading session_info-1.0.0.tar.gz (24 kB)
Requirement already satisfied: pandas in /shared-libs/python3.7/py/lib/python3.7/site-packages (from vega-datasets) (1.2.5)
Collecting stdlib_list
Downloading stdlib_list-0.8.0-py3-none-any.whl (63 kB)
|████████████████████████████████| 63 kB 3.8 MB/s
Requirement already satisfied: pytz>=2017.3 in /shared-libs/python3.7/py/lib/python3.7/site-packages (from pandas->vega-datasets) (2021.3)
Requirement already satisfied: python-dateutil>=2.7.3 in /shared-libs/python3.7/py-core/lib/python3.7/site-packages (from pandas->vega-datasets) (2.8.2)
Requirement already satisfied: numpy>=1.16.5 in /shared-libs/python3.7/py/lib/python3.7/site-packages (from pandas->vega-datasets) (1.19.5)
Requirement already satisfied: six>=1.5 in /shared-libs/python3.7/py-core/lib/python3.7/site-packages (from python-dateutil>=2.7.3->pandas->vega-datasets) (1.16.0)
Building wheels for collected packages: session-info
Building wheel for session-info (setup.py) ... done
Created wheel for session-info: filename=session_info-1.0.0-py3-none-any.whl size=8045 sha256=cef04da6e4ec27725e555b78de4576824700335c9c1fe3692a8d6305f1781737
Stored in directory: /root/.cache/pip/wheels/bd/ad/14/6a42359351a18337a8683854cfbba99dd782271f2d1767f87f
Successfully built session-info
Installing collected packages: vega-datasets, stdlib-list, session-info
Successfully installed session-info-1.0.0 stdlib-list-0.8.0 vega-datasets-0.9.0
WARNING: You are using pip version 20.1.1; however, version 21.3.1 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
Note: you may need to restart the kernel to use updated packages.
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy as sc
import seaborn as sns
# load an example dataset
from vega_datasets import data
cars = data.cars()
# plot the dataset, referencing dataframe column names
import altair as alt
alt.Chart(cars).mark_bar().encode(
x=alt.X('Miles_per_Gallon', bin=True),
y='count()',
)