Skip to content

Instantly share code, notes, and snippets.

@ShimanoN
Created January 23, 2023 13:24
Show Gist options
  • Save ShimanoN/597fa174e3f115eeb519c34a16886335 to your computer and use it in GitHub Desktop.
Save ShimanoN/597fa174e3f115eeb519c34a16886335 to your computer and use it in GitHub Desktop.
20230123pandas1.ipynb
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "28a12097-db81-49cc-9a84-7159071438f7",
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "63a0c2a6-437a-49e3-904a-23f3c8bfa4ce",
"metadata": {},
"outputs": [],
"source": [
"df_fatiguetest_data = pd.read_csv('207-150001_M0001.csv', skiprows = 14, names = ('time','load','disp'))"
]
},
{
"cell_type": "code",
"execution_count": 23,
"id": "3f1ea339-8761-41c9-ad08-a86860b3b0dc",
"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>time</th>\n",
" <th>load</th>\n",
" <th>disp</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>0.00</td>\n",
" <td>1.800</td>\n",
" <td>3.200</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>0.02</td>\n",
" <td>0.900</td>\n",
" <td>2.775</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>0.04</td>\n",
" <td>0.575</td>\n",
" <td>2.600</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>0.06</td>\n",
" <td>0.900</td>\n",
" <td>2.725</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>0.08</td>\n",
" <td>1.775</td>\n",
" <td>3.100</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12495</th>\n",
" <td>249.90</td>\n",
" <td>5.225</td>\n",
" <td>4.800</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12496</th>\n",
" <td>249.92</td>\n",
" <td>5.750</td>\n",
" <td>5.050</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12497</th>\n",
" <td>249.94</td>\n",
" <td>5.600</td>\n",
" <td>5.000</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12498</th>\n",
" <td>249.96</td>\n",
" <td>4.850</td>\n",
" <td>4.725</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12499</th>\n",
" <td>249.98</td>\n",
" <td>3.700</td>\n",
" <td>4.250</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>12500 rows × 3 columns</p>\n",
"</div>"
],
"text/plain": [
" time load disp\n",
"0 0.00 1.800 3.200\n",
"1 0.02 0.900 2.775\n",
"2 0.04 0.575 2.600\n",
"3 0.06 0.900 2.725\n",
"4 0.08 1.775 3.100\n",
"... ... ... ...\n",
"12495 249.90 5.225 4.800\n",
"12496 249.92 5.750 5.050\n",
"12497 249.94 5.600 5.000\n",
"12498 249.96 4.850 4.725\n",
"12499 249.98 3.700 4.250\n",
"\n",
"[12500 rows x 3 columns]"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df_fatiguetest_data"
]
}
],
"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.9.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment