prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Pandas dependency
  We now depends on Pandas:
  https://github.com/vaexio/vaex/blob/255ccbc192d54c619a273de21a05f919da8ffadf/packages/vaex-core/vaex/formatting.py
  
  Introduced in https://github.com/vaexio/vaex/pull/192
  
  We should not depend on pandas, it is not a dependency of vaex-core and should not become, we might also grow to large to run on AWS Lambda.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `packages/vaex-core/vaex/formatting.py`
  Content:
  ```
  1 import numpy as np
  2 import numbers
  3 import six
  4 import pandas as pd
  5 
  6 
  7 MAX_LENGTH = 50
  8 
  9 
  10 def _format_value(value):
  11     if isinstance(value, six.string_types):
  12         value = str(value)
  13     elif isinstance(value, bytes):
  14         value = repr(value)
  15     elif isinstance(value, np.ma.core.MaskedConstant):
  16         value = str(value)
  17     if isinstance(value, np.datetime64):
  18         value = str(pd.to_datetime(value))
  19     if isinstance(value, np.timedelta64):
  20         value = str(pd.to_timedelta(value))
  21     elif not isinstance(value, numbers.Number):
  22         value = str(value)
  23     if isinstance(value, float):
  24         value = repr(value)
  25     if isinstance(value, (str, bytes)):
  26         if len(value) > MAX_LENGTH:
  27             value = repr(value[:MAX_LENGTH-3])[:-1] + '...'
  28     return value
  29
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/packages/vaex-core/vaex/formatting.py b/packages/vaex-core/vaex/formatting.py
  --- a/packages/vaex-core/vaex/formatting.py
  +++ b/packages/vaex-core/vaex/formatting.py
  @@ -1,7 +1,7 @@
   import numpy as np
   import numbers
   import six
  -import pandas as pd
  +import datetime
   
   
   MAX_LENGTH = 50
  @@ -15,9 +15,24 @@
       elif isinstance(value, np.ma.core.MaskedConstant):
           value = str(value)
       if isinstance(value, np.datetime64):
  -        value = str(pd.to_datetime(value))
  +        if np.isnat(value):
  +            value = 'NaT'
  +        else:
  +            value = ' '.join(str(value).split('T'))
       if isinstance(value, np.timedelta64):
  -        value = str(pd.to_timedelta(value))
  +        if np.isnat(value):
  +            value = 'NaT'
  +        else:
  +            tmp = datetime.timedelta(seconds=value / np.timedelta64(1, 's'))
  +            ms = tmp.microseconds
  +            s = np.mod(tmp.seconds, 60)
  +            m = np.mod(tmp.seconds//60, 60)
  +            h = tmp.seconds // 3600
  +            d = tmp.days
  +            if ms:
  +                value = str('%i days %+02i:%02i:%02i.%i' % (d,h,m,s,ms))
  +            else:
  +                value = str('%i days %+02i:%02i:%02i' % (d,h,m,s))
       elif not isinstance(value, numbers.Number):
           value = str(value)
       if isinstance(value, float):
  
verification_info: {"golden_diff": "diff --git a/packages/vaex-core/vaex/formatting.py b/packages/vaex-core/vaex/formatting.py\n--- a/packages/vaex-core/vaex/formatting.py\n+++ b/packages/vaex-core/vaex/formatting.py\n@@ -1,7 +1,7 @@\n import numpy as np\n import numbers\n import six\n-import pandas as pd\n+import datetime\n \n \n MAX_LENGTH = 50\n@@ -15,9 +15,24 @@\n     elif isinstance(value, np.ma.core.MaskedConstant):\n         value = str(value)\n     if isinstance(value, np.datetime64):\n-        value = str(pd.to_datetime(value))\n+        if np.isnat(value):\n+            value = 'NaT'\n+        else:\n+            value = ' '.join(str(value).split('T'))\n     if isinstance(value, np.timedelta64):\n-        value = str(pd.to_timedelta(value))\n+        if np.isnat(value):\n+            value = 'NaT'\n+        else:\n+            tmp = datetime.timedelta(seconds=value / np.timedelta64(1, 's'))\n+            ms = tmp.microseconds\n+            s = np.mod(tmp.seconds, 60)\n+            m = np.mod(tmp.seconds//60, 60)\n+            h = tmp.seconds // 3600\n+            d = tmp.days\n+            if ms:\n+                value = str('%i days %+02i:%02i:%02i.%i' % (d,h,m,s,ms))\n+            else:\n+                value = str('%i days %+02i:%02i:%02i' % (d,h,m,s))\n     elif not isinstance(value, numbers.Number):\n         value = str(value)\n     if isinstance(value, float):\n", "issue": "Pandas dependency\nWe now depends on Pandas:\r\nhttps://github.com/vaexio/vaex/blob/255ccbc192d54c619a273de21a05f919da8ffadf/packages/vaex-core/vaex/formatting.py\r\n\r\nIntroduced in https://github.com/vaexio/vaex/pull/192\r\n\r\nWe should not depend on pandas, it is not a dependency of vaex-core and should not become, we might also grow to large to run on AWS Lambda.\n", "before_files": [{"content": "import numpy as np\nimport numbers\nimport six\nimport pandas as pd\n\n\nMAX_LENGTH = 50\n\n\ndef _format_value(value):\n    if isinstance(value, six.string_types):\n        value = str(value)\n    elif isinstance(value, bytes):\n        value = repr(value)\n    elif isinstance(value, np.ma.core.MaskedConstant):\n        value = str(value)\n    if isinstance(value, np.datetime64):\n        value = str(pd.to_datetime(value))\n    if isinstance(value, np.timedelta64):\n        value = str(pd.to_timedelta(value))\n    elif not isinstance(value, numbers.Number):\n        value = str(value)\n    if isinstance(value, float):\n        value = repr(value)\n    if isinstance(value, (str, bytes)):\n        if len(value) > MAX_LENGTH:\n            value = repr(value[:MAX_LENGTH-3])[:-1] + '...'\n    return value\n", "path": "packages/vaex-core/vaex/formatting.py"}], "after_files": [{"content": "import numpy as np\nimport numbers\nimport six\nimport datetime\n\n\nMAX_LENGTH = 50\n\n\ndef _format_value(value):\n    if isinstance(value, six.string_types):\n        value = str(value)\n    elif isinstance(value, bytes):\n        value = repr(value)\n    elif isinstance(value, np.ma.core.MaskedConstant):\n        value = str(value)\n    if isinstance(value, np.datetime64):\n        if np.isnat(value):\n            value = 'NaT'\n        else:\n            value = ' '.join(str(value).split('T'))\n    if isinstance(value, np.timedelta64):\n        if np.isnat(value):\n            value = 'NaT'\n        else:\n            tmp = datetime.timedelta(seconds=value / np.timedelta64(1, 's'))\n            ms = tmp.microseconds\n            s = np.mod(tmp.seconds, 60)\n            m = np.mod(tmp.seconds//60, 60)\n            h = tmp.seconds // 3600\n            d = tmp.days\n            if ms:\n                value = str('%i days %+02i:%02i:%02i.%i' % (d,h,m,s,ms))\n            else:\n                value = str('%i days %+02i:%02i:%02i' % (d,h,m,s))\n    elif not isinstance(value, numbers.Number):\n        value = str(value)\n    if isinstance(value, float):\n        value = repr(value)\n    if isinstance(value, (str, bytes)):\n        if len(value) > MAX_LENGTH:\n            value = repr(value[:MAX_LENGTH-3])[:-1] + '...'\n    return value\n", "path": "packages/vaex-core/vaex/formatting.py"}]}