docstr: Try to parse a ndarray like into a column by inferring dtype.
docstr_tok: ["Try","to","parse","a","ndarray","like","into","a","column","by","inferring","dtype","."]
code: def _try_convert_data(
      self, name, data, use_dtypes=True, convert_dates=True
  ):
      """
      Try to parse a ndarray like into a column by inferring dtype.
      """
  
      # don't try to coerce, unless a force conversion
      if use_dtypes:
          if self.dtype is False:
              return data, False
          elif self.dtype is True:
              pass
          else:
              # dtype to force
              dtype = (
                  self.dtype.get(name)
                  if isinstance(self.dtype, dict)
                  else self.dtype
              )
              if dtype is not None:
                  try:
                      dtype = np.dtype(dtype)
                      return data.astype(dtype), True
                  except (TypeError, ValueError):
                      return data, False
  
      if convert_dates:
          new_data, result = self._try_convert_to_date(data)
          if result:
              return new_data, True
  
      result = False
  
      if data.dtype == "object":
          # try float
          try:
              data = data.astype("float64")
              result = True
          except (TypeError, ValueError):
              pass
  
      if data.dtype.kind == "f":
          if data.dtype != "float64":
              # coerce floats to 64
              try:
                  data = data.astype("float64")
                  result = True
              except (TypeError, ValueError):
                  pass
  
      # don't coerce 0-len data
      if len(data) and (
          data.dtype == "float" or data.dtype == "object"
      ):
          # coerce ints if we can
          try:
              new_data = data.astype("int64")
              if (new_data == data).all():
                  data = new_data
                  result = True
          except (TypeError, ValueError):
              pass
  
      # coerce ints to 64
      if data.dtype == "int":
          # coerce floats to 64
          try:
              data = data.astype("int64")
              result = True
          except (TypeError, ValueError):
              pass
  
      return data, result
  
imports: from itertools import islice
  import os
  import numpy
  import pandas._libs.json
  from pandas._libs.tslibs import iNaT
  from pandas.compat import StringIO, long, to_str, u
  from pandas.errors import AbstractMethodError
  from pandas.core.dtypes.common import is_period_dtype
  from pandas import DataFrame, MultiIndex, Series, compat, isna, to_datetime
  from pandas.core.reshape.concat import concat
  from pandas.io.common import BaseIterator, _get_handle, _infer_compression, _stringify_path, get_filepath_or_buffer
  from pandas.io.formats.printing import pprint_thing
  from pandas.io.parsers import _validate_integer
  from .normalize import _convert_to_line_delimits
  from .table_schema import build_table_schema, parse_table_schema
label_desc: Use image node_id 6 for calling the Parser obj's underlying member method code with example usage: obj._try_convert_data(name, data, use_dtypes, convert_dates) and returns: data,  result, data,  False, new_data,  True, data,  True, data,  False