कैश से DataFrame हटाना
आपने departures_df DataFrame पर analysis tasks पूरे कर लिए हैं, लेकिन अभी कुछ और प्रोसेसिंग करनी है. आप इस DataFrame को cache से हटाना चाहते हैं ताकि आपके cluster पर अनावश्यक memory उपयोग न हो.
DataFrame departures_df परिभाषित है और पहले से cache किया गया है.
यह अभ्यास पाठ्यक्रम का हिस्सा है
PySpark के साथ डेटा क्लीनिंग
अभ्यास निर्देश
departures_dfDataFrame पर caching status जाँचें.departures_dfDataFrame को cache से हटाएँ.- caching status दोबारा validate करें.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
# Determine if departures_df is in the cache
print("Is departures_df cached?: %s" % departures_df.____)
print("Removing departures_df from cache")
# Remove departures_df from the cache
____
# Check the cache status again
print("Is departures_df cached?: %s" % ____)