Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "cells": [
- {
- "cell_type": "code",
- "execution_count": 13,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/html": [
- "<div>\n",
- "<style scoped>\n",
- " .dataframe tbody tr th:only-of-type {\n",
- " vertical-align: middle;\n",
- " }\n",
- "\n",
- " .dataframe tbody tr th {\n",
- " vertical-align: top;\n",
- " }\n",
- "\n",
- " .dataframe thead th {\n",
- " text-align: right;\n",
- " }\n",
- "</style>\n",
- "<table border=\"1\" class=\"dataframe\">\n",
- " <thead>\n",
- " <tr style=\"text-align: right;\">\n",
- " <th></th>\n",
- " <th>id</th>\n",
- " <th>username</th>\n",
- " <th>first_name</th>\n",
- " <th>last_name</th>\n",
- " <th>birth_year</th>\n",
- " <th>points</th>\n",
- " <th>email</th>\n",
- " </tr>\n",
- " </thead>\n",
- " <tbody>\n",
- " <tr>\n",
- " <th>21</th>\n",
- " <td>22</td>\n",
- " <td>logan.evan</td>\n",
- " <td>Logan</td>\n",
- " <td>Evan</td>\n",
- " <td>1998</td>\n",
- " <td>12</td>\n",
- " <td>logan.evan@example.com</td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>30</th>\n",
- " <td>31</td>\n",
- " <td>jayden.ian</td>\n",
- " <td>Jayden</td>\n",
- " <td>Ian</td>\n",
- " <td>1998</td>\n",
- " <td>10</td>\n",
- " <td>jayden.ian@example.com</td>\n",
- " </tr>\n",
- " <tr>\n",
- " <th>36</th>\n",
- " <td>37</td>\n",
- " <td>wyatt.jason</td>\n",
- " <td>Wyatt</td>\n",
- " <td>Jason</td>\n",
- " <td>2000</td>\n",
- " <td>3</td>\n",
- " <td>wyatt.jason@example.com</td>\n",
- " </tr>\n",
- " </tbody>\n",
- "</table>\n",
- "</div>"
- ],
- "text/plain": [
- " id username first_name last_name birth_year points \\\n",
- "21 22 logan.evan Logan Evan 1998 12 \n",
- "30 31 jayden.ian Jayden Ian 1998 10 \n",
- "36 37 wyatt.jason Wyatt Jason 2000 3 \n",
- "\n",
- " email \n",
- "21 logan.evan@example.com \n",
- "30 jayden.ian@example.com \n",
- "36 wyatt.jason@example.com "
- ]
- },
- "execution_count": 13,
- "metadata": {},
- "output_type": "execute_result"
- }
- ],
- "source": [
- "users[(users[\"birth_year\"]>=1998) & (users[\"birth_year\"]<=2018)]"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.6.5"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 2
- }
Add Comment
Please, Sign In to add comment