{ "cells": [ { "cell_type": "markdown", "id": "b12b5440-e982-4e4c-9edc-bf9c1e10daf5", "metadata": {}, "source": [ "# 🌉 3. Build Bridges, Not Walls" ] }, { "cell_type": "code", "execution_count": null, "id": "ea17fcaa-2b2a-45e0-9837-be1414278154", "metadata": {}, "outputs": [], "source": [ "import pykx as kx" ] }, { "cell_type": "markdown", "id": "1f824b8e-d1a8-4f10-8a2c-44fdb5b6f70c", "metadata": {}, "source": [ "## Traffic" ] }, { "cell_type": "markdown", "id": "289cc2c9-6fe6-4deb-9905-a742174f477d", "metadata": {}, "source": [ "The q language incorporates SQL-like functionality, making it easy to query tables. This module serves as a great starting point for learning q." ] }, { "cell_type": "code", "execution_count": null, "id": "c0d189d2-267e-4bad-80d0-f4c2142115ee", "metadata": {}, "outputs": [], "source": [ "traffic = kx.q.read.csv(\"data/traffic.csv\", \"IPSJS\", \",\", True)\n", "traffic = kx.q.qsql.select(traffic, where='error=`N')\n", "traffic_mad = kx.q('{select avg carga by fecha from x}', traffic)\n", "traffic_mad" ] }, { "cell_type": "markdown", "id": "92d3c0c2-d8eb-4cb1-aa6d-4af0e87efbef", "metadata": {}, "source": [ "