SHARE
TWEET

Untitled

a guest Jul 21st, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import pandas as pd
  2. import os
  3. import glob
  4. from pathlib import Path
  5. import matplotlib
  6. import matplotlib.pylab as plt
  7. import missingno as msno
  8. df = pd.concat(map(lambda file: pd.read_csv(file,index_col=False), glob.glob(os.path.join(output_csv_path, "*.csv"))))
  9. missingdata_df = df.columns[df.isnull().any()].tolist()
  10. msno.matrix(df[missingdata_df])
  11. msno.heatmap(df[missingdata_df], figsize=(20,20))
  12.      
  13. import dask
  14. import dask.dataframe as dd
  15. import pandas as pd
  16. import os
  17. import glob
  18. from pathlib import Path
  19. import matplotlib
  20. import matplotlib.pylab as plt
  21. import missingno as msno
  22. df= dd.read_csv('C:/Users/zeba.anjum/Documents/Output files/*.csv')
  23. missingdata_df = df.columns[df.isnull().any()].tolist()
  24. msno.matrix(df[missingdata_df])
  25. msno.heatmap(df[missingdata_df], figsize=(20,20))
  26.      
  27. runfile('C:/Users/zeba.anjum/Documents/Python code/data_visualization_dask.py', wdir='C:/Users/zeba.anjum/Documents/Python code')
  28. Reloaded modules: UTCts_to_datetime
  29. Traceback (most recent call last):
  30.  
  31.   File "<ipython-input-8-a9679b2c04a9>", line 1, in <module>
  32.     runfile('C:/Users/zeba.anjum/Documents/Python code/data_visualization_dask.py', wdir='C:/Users/zeba.anjum/Documents/Python code')
  33.  
  34.   File "C:Anacondalibsite-packagesspyderutilssitesitecustomize.py", line 705, in runfile
  35.     execfile(filename, namespace)
  36.  
  37.   File "C:Anacondalibsite-packagesspyderutilssitesitecustomize.py", line 102, in execfile
  38.     exec(compile(f.read(), filename, 'exec'), namespace)
  39.  
  40.   File "C:/Users/zeba.anjum/Documents/Python code/data_visualization_dask.py", line 34, in <module>
  41.     msno.matrix(df[missingdata_df])
  42.  
  43.   File "C:Anacondalibsite-packagesmissingnomissingno.py", line 61, in matrix
  44.     ax0.imshow(g, interpolation='none')
  45.  
  46.   File "C:Anacondalibsite-packagesmatplotlib__init__.py", line 1855, in inner
  47.     return func(ax, *args, **kwargs)
  48.  
  49.   File "C:Anacondalibsite-packagesmatplotlibaxes_axes.py", line 5487, in imshow
  50.     im.set_data(X)
  51.  
  52.   File "C:Anacondalibsite-packagesmatplotlibimage.py", line 645, in set_data
  53.     self._A = cbook.safe_masked_invalid(A, copy=True)
  54.  
  55.   File "C:Anacondalibsite-packagesmatplotlibcbook__init__.py", line 1364, in safe_masked_invalid
  56.     x = np.array(x, subok=True, copy=copy)
  57.  
  58. MemoryError
  59.      
  60. Traceback (most recent call last):
  61.  
  62.   File "<ipython-input-7-a9679b2c04a9>", line 1, in <module>
  63.     runfile('C:/Users/zeba.anjum/Documents/Python code/data_visualization_dask.py', wdir='C:/Users/zeba.anjum/Documents/Python code')
  64.  
  65.   File "C:Anacondalibsite-packagesspyderutilssitesitecustomize.py", line 705, in runfile
  66.     execfile(filename, namespace)
  67.  
  68.   File "C:Anacondalibsite-packagesspyderutilssitesitecustomize.py", line 102, in execfile
  69.     exec(compile(f.read(), filename, 'exec'), namespace)
  70.  
  71.   File "C:/Users/zeba.anjum/Documents/Python code/data_visualization_dask.py", line 32, in <module>
  72.     msno.matrix(df[missingdata_df])
  73.  
  74.   File "C:Anacondalibsite-packagesmissingnomissingno.py", line 40, in matrix
  75.     height = df.shape[0]
  76.  
  77.   File "C:Anacondalibsite-packagesdaskdataframecore.py", line 2414, in __getattr__
  78.     raise AttributeError("'DataFrame' object has no attribute %r" % key)
  79.  
  80. AttributeError: 'DataFrame' object has no attribute 'shape'
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top