Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
clairescanlon authored Jan 24, 2024
1 parent f20c2cf commit be67874
Showing 1 changed file with 158 additions and 0 deletions.
158 changes: 158 additions & 0 deletions T1 - Defining a List for 5 Crypto Currencies.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "d6b32183",
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "06528676",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"['BTC', 'XRP', 'LTC', 'ADA', 'ETH']"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# TASK 1 - Defining a Python List That Contains 5 Crypto Currencies\n",
"crypto_list = ['BTC', 'XRP', 'LTC', 'ADA', 'ETH' ]\n",
"crypto_list"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "e096be91",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"list"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Confirming the Data Type\n",
"type(crypto_list)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "fcbbca46",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 BTC\n",
"1 XRP\n",
"2 LTC\n",
"3 ADA\n",
"4 ETH\n",
"dtype: object"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Creating A One Dimensional Pandas Series\n",
"crypto_series = pd.Series(data = crypto_list)\n",
"crypto_series"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "738552c3",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"pandas.core.series.Series"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Confirming the Pandas Series Data Type\n",
"type(crypto_series)\n"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "9c26d8b8",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 2000\n",
"1 500\n",
"2 2000\n",
"3 20\n",
"4 50\n",
"dtype: int64"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# Defining Another Pandas Series with Crypto Prices\n",
"crypto_prices_series = pd.Series(data = [2000, 500, 2000, 20, 50])\n",
"crypto_prices_series"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.12.1"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

0 comments on commit be67874

Please sign in to comment.