Files
awesome-notebooks/Excel/Excel_Read_file.ipynb
2024-02-26 15:43:08 +00:00

252 lines
5.2 KiB
Plaintext

{
"cells": [
{
"cell_type": "markdown",
"id": "tropical-breakfast",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"<img width=\"8%\" alt=\"Excel.png\" src=\"https://raw.githubusercontent.com/jupyter-naas/awesome-notebooks/master/.github/assets/logos/Excel.png\" style=\"border-radius: 15%\">"
]
},
{
"cell_type": "markdown",
"id": "danish-allergy",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"# Excel - Read file\n",
"<a href=\"https://bit.ly/3JyWIk6\">Give Feedback</a> | <a href=\"https://github.com/jupyter-naas/awesome-notebooks/issues/new?assignees=&labels=bug&template=bug_report.md&title=Excel+-+Read+file:+Error+short+description\">Bug report</a>"
]
},
{
"cell_type": "markdown",
"id": "978e5e32-8839-4b39-abb7-f5e8bda9f313",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"**Tags:** #excel #pandas #read #finance #snippet #dataframe"
]
},
{
"cell_type": "markdown",
"id": "1bf0834d-3a8e-4f4a-98ee-fdbcc2ee650f",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"**Author:** [Florent Ravenel](https://www.linkedin.com/in/ACoAABCNSioBW3YZHc2lBHVG0E_TXYWitQkmwog/)"
]
},
{
"cell_type": "markdown",
"id": "51bab36c-8a23-4df8-883b-a22f10a8f3d7",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"**Last update:** 2023-04-12 (Created: 2021-02-28)"
]
},
{
"cell_type": "markdown",
"id": "naas-description",
"metadata": {
"papermill": {},
"tags": [
"description"
]
},
"source": [
"**Description:** This notebook reads an Excel file and allows users to manipulate the data within it."
]
},
{
"cell_type": "markdown",
"id": "surgical-birmingham",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"## Input"
]
},
{
"cell_type": "markdown",
"id": "2112a917-9ba5-4ed3-b7c1-f204f0aca263",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"### Import libraries"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f7876579-4803-4130-b095-497225f417f7",
"metadata": {
"papermill": {},
"tags": []
},
"outputs": [],
"source": [
"import pandas as pd"
]
},
{
"cell_type": "markdown",
"id": "6ae0fb10-e3c2-4ced-bd32-c2112195dc24",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"### Variables"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "0e204bc4-efbf-4dc5-b947-9fe568724fc6",
"metadata": {
"papermill": {},
"tags": []
},
"outputs": [],
"source": [
"excel_file_path = \"Excel-Sales_Jan2020.xlsx\""
]
},
{
"cell_type": "markdown",
"id": "4b24dceb-ed1e-4af9-af4e-48f592e2438b",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"## Model"
]
},
{
"cell_type": "markdown",
"id": "656610e2-5595-429c-ae1e-ccb1d32671d7",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"### Read excel"
]
},
{
"cell_type": "markdown",
"id": "f08eea54-87b0-4aba-8c5a-2a856c9ed8ca",
"metadata": {
"execution": {
"iopub.execute_input": "2022-02-22T07:35:00.624021Z",
"iopub.status.busy": "2022-02-22T07:35:00.623743Z",
"iopub.status.idle": "2022-02-22T07:35:00.632235Z",
"shell.execute_reply": "2022-02-22T07:35:00.631300Z",
"shell.execute_reply.started": "2022-02-22T07:35:00.623996Z"
},
"papermill": {},
"tags": []
},
"source": [
"You want to add more parameters ?<br>\n",
"👉 Check out the pandas documentation <a href=\"https://pandas.pydata.org/docs/reference/api/pandas.read_excel.html\">here</a>."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "hawaiian-consortium",
"metadata": {
"papermill": {},
"tags": []
},
"outputs": [],
"source": [
"df = pd.read_excel(excel_file_path)"
]
},
{
"cell_type": "markdown",
"id": "expired-target",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"## Output"
]
},
{
"cell_type": "markdown",
"id": "6a76ae5d-9117-420f-84f4-49ab28e4a8f3",
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"### Display result"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "agreed-correspondence",
"metadata": {
"papermill": {},
"tags": []
},
"outputs": [],
"source": [
"df"
]
}
],
"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.8.8"
},
"naas": {
"notebook_id": "32e6a2bbb504fb622cc153607a48c61677401ab357a4d2117b6b3820be4fbd69",
"notebook_path": "Excel/Excel_Read_file.ipynb"
},
"papermill": {
"default_parameters": {},
"environment_variables": {},
"parameters": {},
"version": "2.3.3"
}
},
"nbformat": 4,
"nbformat_minor": 5
}