<jupyter_start><jupyter_text>np.save()<jupyter_code>lending_co=np.genfromtxt('Lending-Company-Saving.csv',delimiter=',',dtype=np.str)
print(lending_co)
np.save('Lending-Company-Saving',lending_co)
lending_data_save=np.load("Lending-Company-Saving.npy")
print(lending_data_save)<jupyter_output>[['LoanID' 'StringID' 'Product' ... 'Location' 'Region' 'TotalPrice']
 ['1' 'id_1' 'Product B' ... 'Location 2' 'Region 2' '16600.0']
 ['2' 'id_2' 'Product B' ... 'Location 3' '' '16600.0']
 ...
 ['1041' 'id_1041' 'Product B' ... 'Location 23' 'Region 4' '16600.0']
 ['1042' 'id_1042' 'Product C' ... 'Location 52' 'Region 6' '15600.0']
 ['1043' 'id_1043' 'Product B' ... 'Location 142' 'Region 6' '16600.0']]<jupyter_text>np.savez<jupyter_code>lending_co=np.genfromtxt('Lending-Company-Saving.csv',delimiter=',',dtype=np.str)
lending_data_save=np.load("Lending-Company-Saving.npy")
np.savez('Lending-Company-Saving',lending_co,lending_data_save)
lending_data_savez=np.load("Lending-Company-Saving.npz")
print(lending_data_savez)
print(lending_data_savez["arr_0"])
np.savez('Lending-Company-Saving',company=lending_co,data_save=lending_data_save)
lending_data_savez=np.load("Lending-Company-Saving.npz")
lending_data_savez.files
print(lending_data_savez["data_save"])<jupyter_output>[['LoanID' 'StringID' 'Product' ... 'Location' 'Region' 'TotalPrice']
 ['1' 'id_1' 'Product B' ... 'Location 2' 'Region 2' '16600.0']
 ['2' 'id_2' 'Product B' ... 'Location 3' '' '16600.0']
 ...
 ['1041' 'id_1041' 'Product B' ... 'Location 23' 'Region 4' '16600.0']
 ['1042' 'id_1042' 'Product C' ... 'Location 52' 'Region 6' '15600.0']
 ['1043' 'id_1043' 'Product B' ... 'Location 142' 'Region 6' '16600.0']]<jupyter_text>np.savetxt<jupyter_code>lending_co=np.genfromtxt('Lending-Company-Saving.csv',delimiter=',',dtype=np.str)

np.savetxt('Lending-Company-Saving.txt',
           lending_co,fmt='%s',delimiter=',')
lending_data_savetxt=np.genfromtxt("Lending-Company-Saving.txt",delimiter=",",dtype=np.str)
print(lending_data_savetxt)<jupyter_output>[['LoanID' 'StringID' 'Product' ... 'Location' 'Region' 'TotalPrice']
 ['1' 'id_1' 'Product B' ... 'Location 2' 'Region 2' '16600.0']
 ['2' 'id_2' 'Product B' ... 'Location 3' '' '16600.0']
 ...
 ['1041' 'id_1041' 'Product B' ... 'Location 23' 'Region 4' '16600.0']
 ['1042' 'id_1042' 'Product C' ... 'Location 52' 'Region 6' '15600.0']
 ['1043' 'id_1043' 'Product B' ... 'Location 142' 'Region 6' '16600.0']]
{'fraction_non_alphanumeric': 0.2187115305703734, 'fraction_numerical': 0.08781288469429627, 'mean_word_length': 6.025936599423631, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '132938', 'license': 'MIT', 'n_tokens_mistral': 1144, 'n_tokens_neox': 1018, 'n_words': 162, 'path': '365 DS/Import Part 3.ipynb', 'repo_name': 'alekhaya99/Numpy_Tutorial', 'size': '2437'}