0

Trying to enter data from pandas into an excel datasheet say columns a, c and d, the datasheet has columns with functions which are at column b and d. How do I enter data without over writing the functions in the columns.

  • a b c d e
  • 1 . a2/2 . . c+d
  • 2 . 0 . . 0
  • 3 . 0 . . 0

In my data b and d have NaN value, how do I stop over writing b and d so the functions remain? (. = empty cells in excel)

I have tried opening the file and building a dataframe with just b and d to add to the dataframe but cannot do so as they are equations.

I want either to import the dataframe into excel without changing b and d, or be able to pull b and d out to add to the dataframe before importing into the spreadsheet.

1 Answers1

0

I don't know if it possibile with pandas, but you can take a look at this package Openpyxl.

With this package you can write signle cells value in a xlsx file.

Or you can calculate and append new columns in pandas, here there is an example on how you can do it.

DonPre
  • 158
  • 7