1. Predict the output of following code fragments one by one. For every next code fragment, consider that the changes by previous code fragment are in place. That is, for code fragment (b), changes made by code fragment (a) are persisting ; for (c), changes by (a) and (b ) are persisting and so on.

(a) import pandas as pd columns =[‘2015’, ‘2016’, ‘2017’, ‘2018’] index=[‘Messi’,’Ronaldo’,’Neymar’,’Hazard’ ] df = pd.DataFrame(columns=columns, index=index) print(df) # No values inserted, so all of them are nan df.to_csv(“c:\one.csv”) # Output 2015 2016 2017 2018 Messi NaN NaN NaN NaN Ronaldo NaN NaN NaN NaN Neymar NaN NaN NaN NaN Hazard NaN NaN NaN NaN (b) […]

1. Predict the output of following code fragments one by one. For every next code fragment, consider that the changes by previous code fragment are in place. That is, for code fragment (b), changes made by code fragment (a) are persisting ; for (c), changes by (a) and (b ) are persisting and so on. Read More ยป