Graphs
Python code
- There is a starter code that correctly creates graphs in most cases. See here here
- You need to define the function
handler(df_list)
:df_list
is a list of pandas DataFramesdf_list = [df1, df2, df3, ...]
- It needs to return value in the form as below:
response = { 'headers': {"Content-Type": "image/jpg"}, 'statusCode': 200, 'body': body, 'isBase64Encoded': True }
Runtime environment
The following packages are available in the environment:
- numpy
- pandas
- seaborn
- Pillow
- testresources
- astral
- matplotlib
There is no internet available in the environment. The maximum runtime of the function is 10 seconds.
Fonts
Here is a list of Google fonts installed on the runtime on top of standard fonts:
- roboto
- arimo
- open_sans
- lato
- monstrerrat
- roboto_consensed
- osvald
- poppins
- raleway
You can use the fonts in matplot lib by, e.g.
import matplotlib.pyplot as plt
plt.rcParams.update({
'font.family': 'Poppins'
})