|
44 | 44 | "except:\n", |
45 | 45 | " !pip install odsbox \n", |
46 | 46 | " \n", |
47 | | - "from odsbox.con_i import ConI\n", |
48 | | - "from odsbox.submatrix_to_pandas import submatrix_to_pandas" |
| 47 | + "from odsbox.con_i import ConI" |
49 | 48 | ] |
50 | 49 | }, |
51 | 50 | { |
|
218 | 217 | "\n", |
219 | 218 | "Until now, we haven't loaded any mass data, yet. \n", |
220 | 219 | "\n", |
221 | | - "In our data model, the individual profiles are not contained in a big single dataset. They are stored profile by profile in so called submatrices (we looked at them before a bit). So we go and fetch the first profile returned as DataFrame by using `submatrix_to_pandas`. " |
| 220 | + "In our data model, the individual profiles are not contained in a big single dataset. They are stored profile by profile in so called submatrices (we looked at them before a bit). So we go and fetch the first profile returned as DataFrame by using ` con_i.bulk.data_read(...)`. " |
222 | 221 | ] |
223 | 222 | }, |
224 | 223 | { |
|
560 | 559 | "\n", |
561 | 560 | "print(profile_name)\n", |
562 | 561 | "\n", |
563 | | - "dm_df = submatrix_to_pandas(con_i, dm_id)\n", |
564 | | - "if \"Time\" in dm_df.columns:\n", |
565 | | - " dm_df.set_index(\"Time\", inplace=True)\n", |
566 | | - "elif \"time\" in dm_df.columns:\n", |
567 | | - " dm_df.set_index(\"time\", inplace=True)\n", |
| 562 | + "dm_df = con_i.bulk.data_read(dm_id)\n", |
| 563 | + "\n", |
568 | 564 | "dm_df.head()" |
569 | 565 | ] |
570 | 566 | }, |
|
636 | 632 | } |
637 | 633 | ], |
638 | 634 | "source": [ |
639 | | - "dm_df = submatrix_to_pandas(con_i, dm_id)\n", |
640 | | - "if \"Time\" in dm_df.columns:\n", |
641 | | - " dm_df.set_index(\"Time\", inplace=True)\n", |
642 | | - "elif \"time\" in dm_df.columns:\n", |
643 | | - " dm_df.set_index(\"time\", inplace=True)\n", |
| 635 | + "dm_df = con_i.bulk.data_read(dm_id)\n", |
644 | 636 | "\n", |
645 | 637 | "coi = target_features\n", |
646 | 638 | "fig, ax = plt.subplots()\n", |
|
797 | 789 | "\n", |
798 | 790 | "\n", |
799 | 791 | "# normalize\n", |
800 | | - "dm_df = submatrix_to_pandas(con_i, dm_id)\n", |
| 792 | + "dm_df = con_i.bulk.data_read(dm_id, set_independent_as_index=False)\n", |
801 | 793 | "\n", |
802 | 794 | "dm_df = dm_df / dm_df.abs().max(axis=0)\n", |
803 | 795 | "transformed = PCA().fit_transform(dm_df.drop(target_features, axis=1))\n", |
|
861 | 853 | ], |
862 | 854 | "metadata": { |
863 | 855 | "kernelspec": { |
864 | | - "display_name": "Python 3", |
| 856 | + "display_name": ".venv", |
865 | 857 | "language": "python", |
866 | 858 | "name": "python3" |
867 | 859 | }, |
|
875 | 867 | "name": "python", |
876 | 868 | "nbconvert_exporter": "python", |
877 | 869 | "pygments_lexer": "ipython3", |
878 | | - "version": "3.13.6" |
| 870 | + "version": "3.11.6" |
879 | 871 | } |
880 | 872 | }, |
881 | 873 | "nbformat": 4, |
|
0 commit comments