|
3036 | 3036 | "\n", |
3037 | 3037 | "Now we have completed our analysis, what can be done to \n", |
3038 | 3038 | "\n", |
| 3039 | + "- access specific columns\n", |
3039 | 3040 | "- combine for further analysis\n", |
3040 | 3041 | "- save results" |
3041 | 3042 | ] |
3042 | 3043 | }, |
| 3044 | + { |
| 3045 | + "cell_type": "markdown", |
| 3046 | + "metadata": {}, |
| 3047 | + "source": [ |
| 3048 | + "### Access specific columns\n", |
| 3049 | + "\n", |
| 3050 | + "In order to access a specific column of the computed results or the {class}`trajectory data<trajectory_data.TrajectoryData>` *PedPy* provides all the column names for access.\n", |
| 3051 | + "It is highly encouraged to use these identifiers instead of using the column names directly, as the identifier would be updated, if they change. \n", |
| 3052 | + "A list of all identifiers can be found in the [API reference](api_column_identifier)." |
| 3053 | + ] |
| 3054 | + }, |
| 3055 | + { |
| 3056 | + "cell_type": "code", |
| 3057 | + "execution_count": null, |
| 3058 | + "metadata": {}, |
| 3059 | + "outputs": [], |
| 3060 | + "source": [ |
| 3061 | + "from pedpy.column_identifier import *\n", |
| 3062 | + "\n", |
| 3063 | + "# Access with column identifier\n", |
| 3064 | + "traj.data[[ID_COL, FRAME_COL, POINT_COL]]" |
| 3065 | + ] |
| 3066 | + }, |
| 3067 | + { |
| 3068 | + "cell_type": "code", |
| 3069 | + "execution_count": null, |
| 3070 | + "metadata": {}, |
| 3071 | + "outputs": [], |
| 3072 | + "source": [ |
| 3073 | + "# Access with column names\n", |
| 3074 | + "traj.data[[\"id\", \"frame\", \"point\"]]" |
| 3075 | + ] |
| 3076 | + }, |
3043 | 3077 | { |
3044 | 3078 | "cell_type": "markdown", |
3045 | 3079 | "metadata": { |
|
3267 | 3301 | "name": "python", |
3268 | 3302 | "nbconvert_exporter": "python", |
3269 | 3303 | "pygments_lexer": "ipython3", |
3270 | | - "version": "3.11.5" |
| 3304 | + "version": "3.11.8" |
3271 | 3305 | } |
3272 | 3306 | }, |
3273 | 3307 | "nbformat": 4, |
|
0 commit comments