convert the dataframe columns to int dtype given that the columns might have multiple values

I wish to convert certain dataframe columns to int type(Note: my dataframe might have more than the current examples and quite dynamic so I wish to find a best way to convert it). Codes: import pandas as pd import numpy as np df_p = pd.DataFrame({‘1.0’: [1,2,3], ‘2.0’: [4,5,6], ‘3.0’: [7,8,9], ‘4.0’: [4,5,6], ‘5.0’: [4,5,6], ‘6.0’:…

Details

How to get the accurate offsetTop of elements in react componentDidMount?

There is ceiling tabBar which represent different part of my page and i try to get each part‘s offsetTop in componentDidMount, then i can switch the tabBar by comparing the document.element.scrollTop to the offsetTop. However i found that i can’t get the correct offsetTop of each part in componengtDidMount,since elements didn’t being fully rendered. here…

Details