|
47 | 47 | { |
48 | 48 | "cell_type": "code", |
49 | 49 | "execution_count": null, |
50 | | - "metadata": { |
51 | | - "vscode": { |
52 | | - "languageId": "shellscript" |
53 | | - } |
54 | | - }, |
| 50 | + "metadata": {}, |
55 | 51 | "outputs": [], |
56 | 52 | "source": [ |
57 | | - "pip install dataanalysistoolkit" |
| 53 | + "%pip install dataanalysistoolkit\n" |
58 | 54 | ] |
59 | 55 | }, |
60 | 56 | { |
|
66 | 62 | }, |
67 | 63 | { |
68 | 64 | "cell_type": "code", |
69 | | - "execution_count": null, |
70 | | - "metadata": {}, |
71 | | - "outputs": [], |
| 65 | + "execution_count": 3, |
| 66 | + "metadata": {}, |
| 67 | + "outputs": [ |
| 68 | + { |
| 69 | + "ename": "ModuleNotFoundError", |
| 70 | + "evalue": "No module named 'src'", |
| 71 | + "output_type": "error", |
| 72 | + "traceback": [ |
| 73 | + "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m", |
| 74 | + "\u001b[1;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)", |
| 75 | + "Cell \u001b[1;32mIn[3], line 2\u001b[0m\n\u001b[0;32m 1\u001b[0m \u001b[38;5;66;03m# Importing necessary libraries from the toolkit\u001b[39;00m\n\u001b[1;32m----> 2\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01msrc\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdata_sources\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mexcel_connector\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m ExcelConnector\n\u001b[0;32m 3\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01msrc\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdata_sources\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01msql_connector\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m SQLConnector\n\u001b[0;32m 4\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01msrc\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mdata_sources\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mapi_connector\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m APIConnector\n", |
| 76 | + "\u001b[1;31mModuleNotFoundError\u001b[0m: No module named 'src'" |
| 77 | + ] |
| 78 | + } |
| 79 | + ], |
72 | 80 | "source": [ |
73 | 81 | "# Importing necessary libraries from the toolkit\n", |
74 | | - "from src.data_sources.excel_connector import ExcelConnector\n", |
75 | | - "from src.data_sources.sql_connector import SQLConnector\n", |
76 | | - "from src.data_sources.api_connector import APIConnector\n", |
| 82 | + "from src.data_sources import ExcelConnector\n", |
| 83 | + "from src.data_sources import SQLConnector\n", |
| 84 | + "from src.data_sources import APIConnector\n", |
77 | 85 | "from src.integrators.data_integrator import DataIntegrator\n", |
78 | 86 | "from src.formatters.data_formatter import DataFormatter\n", |
79 | 87 | "\n", |
|
138 | 146 | "df_sheet_index = excel_connector.load_data(sheet_name=1)\n", |
139 | 147 | "\n", |
140 | 148 | "# Display the first few rows of the dataframe\n", |
141 | | - "print(df_sheet_name.head())" |
| 149 | + "print(df_sheet_name.head())\n" |
142 | 150 | ] |
143 | 151 | }, |
144 | 152 | { |
|
155 | 163 | "outputs": [], |
156 | 164 | "source": [ |
157 | 165 | "excel_connector = ExcelConnector('path/to/excel.xlsx')\n", |
158 | | - "df_excel = excel_connector.load_data(sheet_name='Sheet1')" |
| 166 | + "df_excel = excel_connector.load_data(sheet_name='Sheet1')\n" |
159 | 167 | ] |
160 | 168 | }, |
161 | 169 | { |
|
188 | 196 | "df_sql = sql_connector.query_data(query)\n", |
189 | 197 | "\n", |
190 | 198 | "# Display the result\n", |
191 | | - "print(df_sql.head())" |
| 199 | + "print(df_sql.head())\n" |
192 | 200 | ] |
193 | 201 | }, |
194 | 202 | { |
|
369 | 377 | "outputs": [], |
370 | 378 | "source": [ |
371 | 379 | "# Custom method for time-series data integration (hypothetical example)\n", |
372 | | - "time_aligned_df = integrator.integrate_time_series('timestamp_column')" |
| 380 | + "time_aligned_df = integrator.integrate_time_series('timestamp_column')\n" |
373 | 381 | ] |
374 | 382 | }, |
375 | 383 | { |
|
484 | 492 | "formatter.fill_missing_values('another_column', method='ffill')\n", |
485 | 493 | "\n", |
486 | 494 | "# Checking for missing values\n", |
487 | | - "print(combined_df.isnull().sum())" |
| 495 | + "print(combined_df.isnull().sum())\n" |
488 | 496 | ] |
489 | 497 | }, |
490 | 498 | { |
|
508 | 516 | "formatter.custom_transform('numeric_column', lambda x: x ** 2)\n", |
509 | 517 | "\n", |
510 | 518 | "# Viewing the transformed data\n", |
511 | | - "print(combined_df['numeric_column'].head())" |
| 519 | + "print(combined_df['numeric_column'].head())\n" |
512 | 520 | ] |
513 | 521 | }, |
514 | 522 | { |
|
621 | 629 | } |
622 | 630 | ], |
623 | 631 | "metadata": { |
| 632 | + "kernelspec": { |
| 633 | + "display_name": "Python 3", |
| 634 | + "language": "python", |
| 635 | + "name": "python3" |
| 636 | + }, |
624 | 637 | "language_info": { |
625 | | - "name": "python" |
| 638 | + "codemirror_mode": { |
| 639 | + "name": "ipython", |
| 640 | + "version": 3 |
| 641 | + }, |
| 642 | + "file_extension": ".py", |
| 643 | + "mimetype": "text/x-python", |
| 644 | + "name": "python", |
| 645 | + "nbconvert_exporter": "python", |
| 646 | + "pygments_lexer": "ipython3", |
| 647 | + "version": "3.11.9" |
626 | 648 | } |
627 | 649 | }, |
628 | 650 | "nbformat": 4, |
|
0 commit comments