title: How can I change the text format to number format of a table pulled from Python to a Google spreadsheet?
body: <p>I got the next problem. I have a dataframe in Python and I putted it in a Google Spreadsheet and I got this for the numeric columns:</p>
  <p><a href="https://i.stack.imgur.com/Wghr2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Wghr2.png" alt="enter image description here" /></a></p>
  <p>I want the numeric columns in a numeric format. I've been trying this but nothing happens:</p>
  <pre><code>from gspread_formatting import *
  
  fmt = cellFormat(numberFormat=numberFormat(type='NUMBER', pattern='####.#'))
  format_cell_range(worksheet, 'Q2:R2', fmt)
  </code></pre>
  <p>If I put a random text format inside fmt (like background color), it works...So, I don´t know why the transform to numberFormat isn´t working...</p>
  <p>In the Python dataframe, these columns are in a numeric format:</p>
  <p><a href="https://i.stack.imgur.com/1tQZh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1tQZh.png" alt="enter image description here" /></a></p>
  <p>Thanks!</p>
  <p><strong>EDIT</strong>
  This is the code of put the dataframe from Python to a Google sheet:</p>
  <pre><code>import df2gspread as d2g
      def spreadsheet_first_paste(file_name, sheet_id,sheet_name, df):
          scope = ['https://spreadsheets.google.com/feeds',
                   'https://www.googleapis.com/auth/drive']
          creds = ServiceAccountCredentials.from_json_keyfile_name('...path/client_secret.json',scope)
          
          gc = gspread.service_account(filename='...path/client_secret.json')               
          sh = gc.open(file_name)
          spreadsheet_key = sheet_id
          wks_name = sheet_name
          d2g.upload(df, spreadsheet_key, wks_name, credentials=creds, row_names=True)
  </code></pre>
  <p><strong>EDIT2</strong>
  SOLVED:
  <a href="https://stackoverflow.com/questions/63273092/problem-with-data-format-while-importing-pandas-df-from-python-into-google-sheet">Problem with data format while Importing pandas DF from python into google sheets using df2gsheets</a>
  In that post was the solution: I was using the df2gspread library, so I went to the df2gspread.py and modified the lines &quot;wks.update_cells(cell_list)&quot; to &quot;wks.update_cells(cell_list, value_input_option='USER_ENTERED')&quot;</p>