life

PostHeaderIcon Importing a CSV file into MongoDB

Importing data from a CSV file into MongoDB is one of the fastest methods of import available. It is also one of the easiest. With almost every database system exporting to CSV, the following recipe is sure to come in handy.

we just do the following:

mongoimport --db smallbusiness --collection company
 --type csv --headerline --file '/Users/Jerry/Downloads
/data/company.csv' --numInsertionWorkers 5

Read the rest of this entry »

1838 views

PostHeaderIcon Importing a CSV file into a Pandas DataFrame

Pandas is an open-source, high-performance library that provides easy-to-use data structures and data analysis tools for Python. Pandas was created to aid in the analysis of time series data, and has become a standard in the Python community. Not only does it provide data structures, such as a Series and a DataFrame, that help with all aspects of data science, it also has built-in analysis methods which we’ll use later.
Read the rest of this entry »

1922 views

PostHeaderIcon Rename column headers in Pandas

When importing a file into a Pandas DataFrame, Pandas will use the first line of the file as the column names. If you have repeated names, Pandas will add .1 to the column name, sometime it’s bad about it. The following recipe shows you how to rename the column headers in a Pandas DataFrame.
Read the rest of this entry »

1591 views

PostHeaderIcon Merge two datasets in Pandas

Pandas has a built-in functionality to perform SQL-like joins of two DataFrames.
just like python extend two list.
Read the rest of this entry »

1593 views

PostHeaderIcon Create a Pandas DataFrame from a MongoDB query

Create a Pandas DataFrame from a MongoDB query, we will leverage our knowledge of creating MongoDB queries to get the information that we want.

Before running a query against MongoDB, determine the information you want to look at. By creating a query filter, you will save time by only retrieving the information that you want. This is very important when you have millions or billions of rows of data.
Read the rest of this entry »

1956 views

Copyright © 2010 - C++ Technology. All Rights Reserved.

Powered by Jerry | Free Space Provided by connove.com