I want to copy a column with format but there is only an attribute 'value' in range ('A1'). If I only copy the value, it turns to be like this:
eprofitfloor
3830000000
1750000000
1248720000
1200000000
884547100
720000000
eprofitfloor
383000000000%
175000000000%
124872000000%
120000000000%
88454710000%
72000000000%
I am saying not only this column,I want to copy all the column completely,only copying value will lead me some problems like the orginal datas are align center, but the results are align left. And a lot problems like that, so I want to copy a column of an Excel file with its orignal format.
First you can convert it into
pandas DataFrameby this wayCast the
dtypetostrusingastypeand append%to thatyou can also do it by using
lambdasuggestion: simply read your
xlsxfile usingpandaswhich gives you more functionality