<jupyter_start><jupyter_text><jupyter_code># 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()',
  color='Origin'
)
from vega_datasets import data
stocks = data.stocks()

import altair as alt
alt.Chart(stocks).mark_line().encode(
  x='date:T',
  y='price',
  color='symbol'
).interactive(bind_y=False)
# load an example dataset
from vega_datasets import data
cars = data.cars()

import altair as alt

interval = alt.selection_interval()

alt.Chart(cars).mark_point().encode(
  x='Horsepower',
  y='Miles_per_Gallon',
  color=alt.condition(interval, 'Origin', alt.value('lightgray'))
).properties(
  selection=interval
)
# 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='mean(Miles_per_Gallon)',
  y='Origin',
  color='Origin'
)
# Clone the entire repo.
!git clone -l -s git://github.com/jakevdp/PythonDataScienceHandbook.git cloned-repo
%cd cloned-repo
!ls
# Fetch a single <1MB file using the raw GitHub URL.
!curl --remote-name \
     -H 'Accept: application/vnd.github.v3.raw' \
     --location https://github.com/vega/vega-datasets/blob/master/data/airports.csv
!ls

pwd

import csv

csvfile = open('airports.csv', 'r')
reader = csv.reader(csvfile)

for row in reader:
    print (row)<jupyter_output>[1;30;43mStreaming output truncated to the last 5000 lines.[0m
['              <td>34.09535361</td>']
['              <td>-117.2348742</td>']
['          </tr>']
['          <tr id="LC2891" class="js-file-line">']
['            <td id="L2891" class="blob-num js-line-number" data-line-number="2891"></td>']
['              <td>SBM</td>']
['              <td>Sheboygan County Memorial</td>']
['              <td>Sheboygan</td>']
['              <td>WI</td>']
['              <td>USA</td>']
['              <td>43.76949444</td>']
['              <td>-87.85158944</td>']
['          </tr>']
['          <tr id="LC2892" class="js-file-line">']
['            <td id="L2892" class="blob-num js-line-number" data-line-number="2892"></td>']
['              <td>SBN</td>']
['              <td>South Bend Regional</td>']
['              <td>South Bend</td>']
['              <td>IN</td>']
['              <td>USA</td>']
['              <td>41.70895361</td>']
['              <td>-86.31847417</td>']
['       [...]
{'fraction_non_alphanumeric': 0.18174665617623917, 'fraction_numerical': 0.03776553894571204, 'mean_word_length': 2.9003067484662575, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 44, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '617533', 'license': 'MIT', 'n_tokens_mistral': 983, 'n_tokens_neox': 903, 'n_words': 182, 'path': 'import_csv.ipynb', 'repo_name': 'Morre525/Python', 'size': '2542'}