~~ Edit, as I see you wanted rows not columns:
Once you apply the style
code, it changes the pandas dataframe from a pandas.core.frame.DataFrame
object to a pandas.io.formats.style.Styler
object. The styler object treats floats differently than the pandas dataframe object and yields what you see in your code (more decimal points). You can change the format with style.format
to get the results you want:
data = [{"col1":"2021-01-02", "col2":32072, "col3":0.0, "col4":1831, "col5":1831,
"col6":1.0, "col7":1, "col8":0, "col9":1, "column10":0.0, "col11":1.0}]
data1 = pd.DataFrame(data)
data1 = data1.style.format(precision=1, subset=list(data1.columns)).set_properties(**{'background-color': 'red'}, subset=['column10'])
data1
Output:

Once you use style, it is no longer a pandas dataframe and is now a Styler object. So, normal commands that work on pandas dataframes no longer work on your newly styled dataframe (e.g. just doing head(10)
no longer works). But, there are work arounds. If you want to look at only the first 10 rows of your Styler after you applied the style, you can export the style that was used and then reapply it to just look at the top 10 rows:
data = [{"col1":"2021-01-02", "col2":32072, "col3":0.0, "col4":1831, "col5":1831,
"col6":1.0, "col7":1, "col8":0, "col9":1, "column10":0.0, "col11":1.0}]
data1 = pd.DataFrame(data)
data1 = data1.append(data*20).reset_index(drop=True)
data1 = data1.style.format(precision=1, subset=list(data1.columns)).set_properties(**{'background-color': 'red'}, subset=['column10'])
Gives a large dataframe:

And then using this code afterwards will head (ie show) only 10 of the rows:
style = data1.export()
data1.data.head(10).style.use(style).format(precision=1, subset=list(data1.columns))
Now it is only showing the first 10 rows:
