An object has an action in its animation data, how can I edit its keyframes? When I print the snippet below, I see that there are 8 entries in the dictionary of fcurves (I assume that they are three entries for translation, 3 for rotation (euler) and 3 for scale). How can I edit each specific channel of this action? For example, how do I update the translation for the keyframes for channel Z-axis?
>> for key, value in bpy.data.actions['ActionName'].fcurves.items():
... print(key, value)
...
0 <bpy_struct, FCurve at 0x7f2299562788>
1 <bpy_struct, FCurve at 0x7f2299562c88>
2 <bpy_struct, FCurve at 0x7f2299562b88>
3 <bpy_struct, FCurve at 0x7f2299562208>
4 <bpy_struct, FCurve at 0x7f2299562a88>
5 <bpy_struct, FCurve at 0x7f2299562f08>
6 <bpy_struct, FCurve at 0x7f2299562888>
7 <bpy_struct, FCurve at 0x7f2299562d08>
8 <bpy_struct, FCurve at 0x7f2299690088>